#include "cmat.h"
#include "matmul.h"
#include "fmm_3x3x6.h"

int fmm_3x3x6(double_cmat C, double_cmat A, double_cmat B) {
    shape_uint A_height = A.shape[0];
    shape_uint A_width = A.shape[1];
    shape_uint B_height = B.shape[0];
    shape_uint B_width = B.shape[1];
    shape_uint C_height = A.shape[0];
    shape_uint C_width = B.shape[1];
    if (A_height <= 1 || A_width <= 1) {
        matmul_double_blas(C, A, B);
        return 0;
    }
    shape_uint BLHA = A_height/3;
    shape_uint BLWA = A_width/3;
    shape_uint NSA = BLHA * BLWA;
    shape_uint BLHB = B_height/3;
    shape_uint BLWB = B_width/6;
    shape_uint NSB = BLHB * BLWB;
    shape_uint BLHC = A_height/3;
    shape_uint BLWC = B_width/6;
    shape_uint NSC = BLHC * BLWC;
    if (!(A_height % 3 == 0 && A_width % 3 == 0 && B_height % 3 == 0 && B_width % 6 == 0 && BLWA == BLHB)) {
        //return matmul_double(C, A, B);
        return -1;
    }
    double dnum8 = 1/8.0;
    double_cmat m;
    create_double_matrix(pairuint {BLHC, BLWC}, &m);
    double_cmat tmp0, tmp1;
    create_double_matrix(pairuint {BLHA, BLWA}, &tmp0);
    create_double_matrix(pairuint {BLHB, BLWB}, &tmp1);
    double_cmat marr[60] = {NULL};
    double_cmat A_x_1;
    double_cmat A_x_2;
    double_cmat A_x_3;
    double_cmat B_x_1;
    double_cmat C_x_1;
    double_cmat B_x_2;
    double_cmat C_x_2;
    double_cmat B_x_3;
    double_cmat C_x_3;
    double_cmat B_x_4;
    double_cmat C_x_4;
    double_cmat B_x_5;
    double_cmat C_x_5;
    double_cmat B_x_6;
    double_cmat C_x_6;
    create_slice_double_matrix_contiguous(&A_x_1, A, pairint { 0, A_height }, pairint { 0*BLWA, 1*BLWA });
    create_slice_double_matrix_contiguous(&A_x_2, A, pairint { 0, A_height }, pairint { 1*BLWA, 2*BLWA });
    create_slice_double_matrix_contiguous(&A_x_3, A, pairint { 0, A_height }, pairint { 2*BLWA, 3*BLWA });
    create_slice_double_matrix_contiguous(&B_x_1, B, pairint { 0, B_height }, pairint { 0*BLWB, 1*BLWB });
    create_slice_double_matrix_contiguous(&B_x_2, B, pairint { 0, B_height }, pairint { 1*BLWB, 2*BLWB });
    create_slice_double_matrix_contiguous(&B_x_3, B, pairint { 0, B_height }, pairint { 2*BLWB, 3*BLWB });
    create_slice_double_matrix_contiguous(&B_x_4, B, pairint { 0, B_height }, pairint { 3*BLWB, 4*BLWB });
    create_slice_double_matrix_contiguous(&B_x_5, B, pairint { 0, B_height }, pairint { 4*BLWB, 5*BLWB });
    create_slice_double_matrix_contiguous(&B_x_6, B, pairint { 0, B_height }, pairint { 5*BLWB, 6*BLWB });
    create_double_matrix(pairuint { C_height, BLWC }, &C_x_1);
    create_double_matrix(pairuint { C_height, BLWC }, &C_x_2);
    create_double_matrix(pairuint { C_height, BLWC }, &C_x_3);
    create_double_matrix(pairuint { C_height, BLWC }, &C_x_4);
    create_double_matrix(pairuint { C_height, BLWC }, &C_x_5);
    create_double_matrix(pairuint { C_height, BLWC }, &C_x_6);
    double_cmat A_1_1 = slice_double_matrix(A_x_1, pairint {0*BLHA, 1*BLWA}, pairint {0, BLWA});
    double_cmat A_1_2 = slice_double_matrix(A_x_2, pairint {0*BLHA, 1*BLWA}, pairint {0, BLWA});
    double_cmat A_1_3 = slice_double_matrix(A_x_3, pairint {0*BLHA, 1*BLWA}, pairint {0, BLWA});
    double_cmat A_2_1 = slice_double_matrix(A_x_1, pairint {1*BLHA, 2*BLWA}, pairint {0, BLWA});
    double_cmat A_2_2 = slice_double_matrix(A_x_2, pairint {1*BLHA, 2*BLWA}, pairint {0, BLWA});
    double_cmat A_2_3 = slice_double_matrix(A_x_3, pairint {1*BLHA, 2*BLWA}, pairint {0, BLWA});
    double_cmat A_3_1 = slice_double_matrix(A_x_1, pairint {2*BLHA, 3*BLWA}, pairint {0, BLWA});
    double_cmat A_3_2 = slice_double_matrix(A_x_2, pairint {2*BLHA, 3*BLWA}, pairint {0, BLWA});
    double_cmat A_3_3 = slice_double_matrix(A_x_3, pairint {2*BLHA, 3*BLWA}, pairint {0, BLWA});
    double_cmat B_1_1 = slice_double_matrix(B_x_1, pairint {0*BLHB, 1*BLWB}, pairint {0, BLWB});
    double_cmat C_1_1 = slice_double_matrix(C_x_1, pairint {0*BLHC, 1*BLWC}, pairint {0, BLWC});
    double_cmat B_1_2 = slice_double_matrix(B_x_2, pairint {0*BLHB, 1*BLWB}, pairint {0, BLWB});
    double_cmat C_1_2 = slice_double_matrix(C_x_2, pairint {0*BLHC, 1*BLWC}, pairint {0, BLWC});
    double_cmat B_1_3 = slice_double_matrix(B_x_3, pairint {0*BLHB, 1*BLWB}, pairint {0, BLWB});
    double_cmat C_1_3 = slice_double_matrix(C_x_3, pairint {0*BLHC, 1*BLWC}, pairint {0, BLWC});
    double_cmat B_1_4 = slice_double_matrix(B_x_4, pairint {0*BLHB, 1*BLWB}, pairint {0, BLWB});
    double_cmat C_1_4 = slice_double_matrix(C_x_4, pairint {0*BLHC, 1*BLWC}, pairint {0, BLWC});
    double_cmat B_1_5 = slice_double_matrix(B_x_5, pairint {0*BLHB, 1*BLWB}, pairint {0, BLWB});
    double_cmat C_1_5 = slice_double_matrix(C_x_5, pairint {0*BLHC, 1*BLWC}, pairint {0, BLWC});
    double_cmat B_1_6 = slice_double_matrix(B_x_6, pairint {0*BLHB, 1*BLWB}, pairint {0, BLWB});
    double_cmat C_1_6 = slice_double_matrix(C_x_6, pairint {0*BLHC, 1*BLWC}, pairint {0, BLWC});
    double_cmat B_2_1 = slice_double_matrix(B_x_1, pairint {1*BLHB, 2*BLWB}, pairint {0, BLWB});
    double_cmat C_2_1 = slice_double_matrix(C_x_1, pairint {1*BLHC, 2*BLWC}, pairint {0, BLWC});
    double_cmat B_2_2 = slice_double_matrix(B_x_2, pairint {1*BLHB, 2*BLWB}, pairint {0, BLWB});
    double_cmat C_2_2 = slice_double_matrix(C_x_2, pairint {1*BLHC, 2*BLWC}, pairint {0, BLWC});
    double_cmat B_2_3 = slice_double_matrix(B_x_3, pairint {1*BLHB, 2*BLWB}, pairint {0, BLWB});
    double_cmat C_2_3 = slice_double_matrix(C_x_3, pairint {1*BLHC, 2*BLWC}, pairint {0, BLWC});
    double_cmat B_2_4 = slice_double_matrix(B_x_4, pairint {1*BLHB, 2*BLWB}, pairint {0, BLWB});
    double_cmat C_2_4 = slice_double_matrix(C_x_4, pairint {1*BLHC, 2*BLWC}, pairint {0, BLWC});
    double_cmat B_2_5 = slice_double_matrix(B_x_5, pairint {1*BLHB, 2*BLWB}, pairint {0, BLWB});
    double_cmat C_2_5 = slice_double_matrix(C_x_5, pairint {1*BLHC, 2*BLWC}, pairint {0, BLWC});
    double_cmat B_2_6 = slice_double_matrix(B_x_6, pairint {1*BLHB, 2*BLWB}, pairint {0, BLWB});
    double_cmat C_2_6 = slice_double_matrix(C_x_6, pairint {1*BLHC, 2*BLWC}, pairint {0, BLWC});
    double_cmat B_3_1 = slice_double_matrix(B_x_1, pairint {2*BLHB, 3*BLWB}, pairint {0, BLWB});
    double_cmat C_3_1 = slice_double_matrix(C_x_1, pairint {2*BLHC, 3*BLWC}, pairint {0, BLWC});
    double_cmat B_3_2 = slice_double_matrix(B_x_2, pairint {2*BLHB, 3*BLWB}, pairint {0, BLWB});
    double_cmat C_3_2 = slice_double_matrix(C_x_2, pairint {2*BLHC, 3*BLWC}, pairint {0, BLWC});
    double_cmat B_3_3 = slice_double_matrix(B_x_3, pairint {2*BLHB, 3*BLWB}, pairint {0, BLWB});
    double_cmat C_3_3 = slice_double_matrix(C_x_3, pairint {2*BLHC, 3*BLWC}, pairint {0, BLWC});
    double_cmat B_3_4 = slice_double_matrix(B_x_4, pairint {2*BLHB, 3*BLWB}, pairint {0, BLWB});
    double_cmat C_3_4 = slice_double_matrix(C_x_4, pairint {2*BLHC, 3*BLWC}, pairint {0, BLWC});
    double_cmat B_3_5 = slice_double_matrix(B_x_5, pairint {2*BLHB, 3*BLWB}, pairint {0, BLWB});
    double_cmat C_3_5 = slice_double_matrix(C_x_5, pairint {2*BLHC, 3*BLWC}, pairint {0, BLWC});
    double_cmat B_3_6 = slice_double_matrix(B_x_6, pairint {2*BLHB, 3*BLWB}, pairint {0, BLWB});
    double_cmat C_3_6 = slice_double_matrix(C_x_6, pairint {2*BLHC, 3*BLWC}, pairint {0, BLWC});
    double_cmat Bxx1;
    double_cmat Bxx10;
    double_cmat Bxx11;
    double_cmat Bxx12;
    double_cmat Bxx13;
    double_cmat Bxx14;
    double_cmat Bxx15;
    double_cmat Bxx16;
    double_cmat Bxx17;
    double_cmat Bxx18;
    double_cmat Bxx19;
    double_cmat Bxx2;
    double_cmat Bxx20;
    double_cmat Bxx21;
    double_cmat Bxx22;
    double_cmat Bxx23;
    double_cmat Bxx24;
    double_cmat Bxx25;
    double_cmat Bxx26;
    double_cmat Bxx27;
    double_cmat Bxx28;
    double_cmat Bxx29;
    double_cmat Bxx3;
    double_cmat Bxx30;
    double_cmat Bxx31;
    double_cmat Bxx32;
    double_cmat Bxx33;
    double_cmat Bxx34;
    double_cmat Bxx35;
    double_cmat Bxx36;
    double_cmat Bxx37;
    double_cmat Bxx4;
    double_cmat Bxx5;
    double_cmat Bxx6;
    double_cmat Bxx7;
    double_cmat Bxx8;
    double_cmat Bxx9;
    create_double_matrix(pairuint {BLHB, BLWB}, &Bxx1);
    create_double_matrix(pairuint {BLHB, BLWB}, &Bxx10);
    create_double_matrix(pairuint {BLHB, BLWB}, &Bxx11);
    create_double_matrix(pairuint {BLHB, BLWB}, &Bxx12);
    create_double_matrix(pairuint {BLHB, BLWB}, &Bxx13);
    create_double_matrix(pairuint {BLHB, BLWB}, &Bxx14);
    create_double_matrix(pairuint {BLHB, BLWB}, &Bxx15);
    create_double_matrix(pairuint {BLHB, BLWB}, &Bxx16);
    create_double_matrix(pairuint {BLHB, BLWB}, &Bxx17);
    create_double_matrix(pairuint {BLHB, BLWB}, &Bxx18);
    create_double_matrix(pairuint {BLHB, BLWB}, &Bxx19);
    create_double_matrix(pairuint {BLHB, BLWB}, &Bxx2);
    create_double_matrix(pairuint {BLHB, BLWB}, &Bxx20);
    create_double_matrix(pairuint {BLHB, BLWB}, &Bxx21);
    create_double_matrix(pairuint {BLHB, BLWB}, &Bxx22);
    create_double_matrix(pairuint {BLHB, BLWB}, &Bxx23);
    create_double_matrix(pairuint {BLHB, BLWB}, &Bxx24);
    create_double_matrix(pairuint {BLHB, BLWB}, &Bxx25);
    create_double_matrix(pairuint {BLHB, BLWB}, &Bxx26);
    create_double_matrix(pairuint {BLHB, BLWB}, &Bxx27);
    create_double_matrix(pairuint {BLHB, BLWB}, &Bxx28);
    create_double_matrix(pairuint {BLHB, BLWB}, &Bxx29);
    create_double_matrix(pairuint {BLHB, BLWB}, &Bxx3);
    create_double_matrix(pairuint {BLHB, BLWB}, &Bxx30);
    create_double_matrix(pairuint {BLHB, BLWB}, &Bxx31);
    create_double_matrix(pairuint {BLHB, BLWB}, &Bxx32);
    create_double_matrix(pairuint {BLHB, BLWB}, &Bxx33);
    create_double_matrix(pairuint {BLHB, BLWB}, &Bxx34);
    create_double_matrix(pairuint {BLHB, BLWB}, &Bxx35);
    create_double_matrix(pairuint {BLHB, BLWB}, &Bxx36);
    create_double_matrix(pairuint {BLHB, BLWB}, &Bxx37);
    create_double_matrix(pairuint {BLHB, BLWB}, &Bxx4);
    create_double_matrix(pairuint {BLHB, BLWB}, &Bxx5);
    create_double_matrix(pairuint {BLHB, BLWB}, &Bxx6);
    create_double_matrix(pairuint {BLHB, BLWB}, &Bxx7);
    create_double_matrix(pairuint {BLHB, BLWB}, &Bxx8);
    create_double_matrix(pairuint {BLHB, BLWB}, &Bxx9);
    static const int8_t B_coeffs_Bxxeval0[2] = {-1, 1, };
    marr[0]=B_1_2;
    marr[1]=B_1_4;
    matlincomb_double_contiguous(Bxx1, 2, (double_cmat*)marr,  (int8_t*)B_coeffs_Bxxeval0);
    static const int8_t B_coeffs_Bxxeval1[2] = {1, -1, };
    marr[0]=B_1_4;
    marr[1]=B_3_4;
    matlincomb_double_contiguous(Bxx2, 2, (double_cmat*)marr,  (int8_t*)B_coeffs_Bxxeval1);
    static const int8_t B_coeffs_Bxxeval2[2] = {-8, 1, };
    marr[0]=B_1_1;
    marr[1]=B_1_2;
    matlincomb_double_contiguous(Bxx3, 2, (double_cmat*)marr,  (int8_t*)B_coeffs_Bxxeval2);
    static const int8_t B_coeffs_Bxxeval3[2] = {1, -8, };
    marr[0]=B_3_4;
    marr[1]=B_3_5;
    matlincomb_double_contiguous(Bxx4, 2, (double_cmat*)marr,  (int8_t*)B_coeffs_Bxxeval3);
    static const int8_t B_coeffs_Bxxeval4[2] = {-1, 8, };
    marr[0]=B_3_4;
    marr[1]=B_3_5;
    matlincomb_double_contiguous(Bxx5, 2, (double_cmat*)marr,  (int8_t*)B_coeffs_Bxxeval4);
    static const int8_t B_coeffs_Bxxeval5[2] = {1, 8, };
    marr[0]=B_1_3;
    marr[1]=B_3_1;
    matlincomb_double_contiguous(Bxx6, 2, (double_cmat*)marr,  (int8_t*)B_coeffs_Bxxeval5);
    static const int8_t B_coeffs_Bxxeval6[2] = {-1, 1, };
    marr[0]=B_1_6;
    marr[1]=B_3_6;
    matlincomb_double_contiguous(Bxx7, 2, (double_cmat*)marr,  (int8_t*)B_coeffs_Bxxeval6);
    static const int8_t B_coeffs_Bxxeval7[2] = {1, 1, };
    marr[0]=B_1_4;
    marr[1]=B_2_6;
    matlincomb_double_contiguous(Bxx8, 2, (double_cmat*)marr,  (int8_t*)B_coeffs_Bxxeval7);
    static const int8_t B_coeffs_Bxxeval8[2] = {8, -1, };
    marr[0]=B_1_1;
    marr[1]=B_2_6;
    matlincomb_double_contiguous(Bxx9, 2, (double_cmat*)marr,  (int8_t*)B_coeffs_Bxxeval8);
    static const int8_t B_coeffs_Bxxeval9[2] = {1, -1, };
    marr[0]=B_1_4;
    marr[1]=B_2_6;
    matlincomb_double_contiguous(Bxx10, 2, (double_cmat*)marr,  (int8_t*)B_coeffs_Bxxeval9);
    static const int8_t B_coeffs_Bxxeval10[2] = {1, 8, };
    marr[0]=B_3_4;
    marr[1]=B_3_5;
    matlincomb_double_contiguous(Bxx11, 2, (double_cmat*)marr,  (int8_t*)B_coeffs_Bxxeval10);
    static const int8_t B_coeffs_Bxxeval11[2] = {8, 1, };
    marr[0]=B_3_1;
    marr[1]=Bxx11;
    matlincomb_double_contiguous(Bxx12, 2, (double_cmat*)marr,  (int8_t*)B_coeffs_Bxxeval11);
    static const int8_t B_coeffs_Bxxeval12[2] = {1, 1, };
    marr[0]=B_1_6;
    marr[1]=B_3_6;
    matlincomb_double_contiguous(Bxx13, 2, (double_cmat*)marr,  (int8_t*)B_coeffs_Bxxeval12);
    static const int8_t B_coeffs_Bxxeval13[2] = {-1, 1, };
    marr[0]=B_1_2;
    marr[1]=Bxx13;
    matlincomb_double_contiguous(Bxx14, 2, (double_cmat*)marr,  (int8_t*)B_coeffs_Bxxeval13);
    static const int8_t B_coeffs_Bxxeval14[2] = {-8, 1, };
    marr[0]=B_2_1;
    marr[1]=Bxx11;
    matlincomb_double_contiguous(Bxx15, 2, (double_cmat*)marr,  (int8_t*)B_coeffs_Bxxeval14);
    static const int8_t B_coeffs_Bxxeval15[2] = {-8, -1, };
    marr[0]=B_2_1;
    marr[1]=B_3_6;
    matlincomb_double_contiguous(Bxx16, 2, (double_cmat*)marr,  (int8_t*)B_coeffs_Bxxeval15);
    static const int8_t B_coeffs_Bxxeval16[2] = {1, 8, };
    marr[0]=B_1_6;
    marr[1]=B_3_1;
    matlincomb_double_contiguous(Bxx17, 2, (double_cmat*)marr,  (int8_t*)B_coeffs_Bxxeval16);
    static const int8_t B_coeffs_Bxxeval17[2] = {-1, 1, };
    marr[0]=B_3_6;
    marr[1]=Bxx17;
    matlincomb_double_contiguous(Bxx18, 2, (double_cmat*)marr,  (int8_t*)B_coeffs_Bxxeval17);
    static const int8_t B_coeffs_Bxxeval18[2] = {8, 1, };
    marr[0]=B_1_1;
    marr[1]=B_2_3;
    matlincomb_double_contiguous(Bxx19, 2, (double_cmat*)marr,  (int8_t*)B_coeffs_Bxxeval18);
    static const int8_t B_coeffs_Bxxeval19[2] = {1, 8, };
    marr[0]=B_1_3;
    marr[1]=B_2_1;
    matlincomb_double_contiguous(Bxx20, 2, (double_cmat*)marr,  (int8_t*)B_coeffs_Bxxeval19);
    static const int8_t B_coeffs_Bxxeval20[2] = {8, 1, };
    marr[0]=B_1_1;
    marr[1]=B_1_6;
    matlincomb_double_contiguous(Bxx21, 2, (double_cmat*)marr,  (int8_t*)B_coeffs_Bxxeval20);
    static const int8_t B_coeffs_Bxxeval21[2] = {1, 1, };
    marr[0]=Bxx16;
    marr[1]=Bxx21;
    matlincomb_double_contiguous(Bxx22, 2, (double_cmat*)marr,  (int8_t*)B_coeffs_Bxxeval21);
    static const int8_t B_coeffs_Bxxeval22[2] = {1, 1, };
    marr[0]=B_1_3;
    marr[1]=Bxx22;
    matlincomb_double_contiguous(Bxx23, 2, (double_cmat*)marr,  (int8_t*)B_coeffs_Bxxeval22);
    cblas_dscal(NSB, 1, &Bxx21.data[0][0], 1);
    static const int8_t B_coeffs_Bxxeval23[1] = {8, };
    marr[0]=B_2_1;
    matlincomb_double_contiguous(Bxx21, 1, (double_cmat*)marr,  (int8_t*)B_coeffs_Bxxeval23);
    static const int8_t B_coeffs_Bxxeval24[3] = {-1, 1, 1, };
    marr[0]=B_1_3;
    marr[1]=B_3_6;
    marr[2]=Bxx21;
    matlincomb_double_contiguous(Bxx24, 3, (double_cmat*)marr,  (int8_t*)B_coeffs_Bxxeval24);
    static const int8_t B_coeffs_Bxxeval25[2] = {-1, 1, };
    marr[0]=B_2_4;
    marr[1]=B_3_6;
    matlincomb_double_contiguous(Bxx25, 2, (double_cmat*)marr,  (int8_t*)B_coeffs_Bxxeval25);
    static const int8_t B_coeffs_Bxxeval26[2] = {1, 8, };
    marr[0]=B_2_4;
    marr[1]=B_3_5;
    matlincomb_double_contiguous(Bxx26, 2, (double_cmat*)marr,  (int8_t*)B_coeffs_Bxxeval26);
    static const int8_t B_coeffs_Bxxeval27[2] = {1, 1, };
    marr[0]=Bxx20;
    marr[1]=Bxx26;
    matlincomb_double_contiguous(Bxx27, 2, (double_cmat*)marr,  (int8_t*)B_coeffs_Bxxeval27);
    static const int8_t B_coeffs_Bxxeval28[2] = {1, -1, };
    marr[0]=B_2_3;
    marr[1]=B_3_3;
    matlincomb_double_contiguous(Bxx28, 2, (double_cmat*)marr,  (int8_t*)B_coeffs_Bxxeval28);
    static const int8_t A_coeffs_11[6] = {1, 1, -1, 1, 1, 1, };
    marr[0]=A_1_1;
    marr[1]=A_1_3;
    marr[2]=A_2_2;
    marr[3]=A_2_3;
    marr[4]=A_3_1;
    marr[5]=A_3_2;
    matlincomb_double_contiguous(tmp0, 6, (double_cmat*)marr, (int8_t*)A_coeffs_11);
    static const int8_t B_coeffs_11[4] = {1, 1, 1, 1, };
    marr[0]=Bxx10;
    marr[1]=Bxx15;
    marr[2]=Bxx28;
    marr[3]=Bxx3;
    matlincomb_double_contiguous(tmp1, 4, (double_cmat*)marr, (int8_t*)B_coeffs_11);
    cblas_dscal(NSB, dnum8, &tmp1.data[0][0], 1);
    matmul_double_blas(m, tmp0, tmp1);
    cblas_daxpy(NSC, -1/8.0, &m.data[0][0], 1, &C_3_1.data[0][0], 1);
    cblas_daxpy(NSC, 1.0, &m.data[0][0], 1, &C_1_2.data[0][0], 1);
    cblas_daxpy(NSC, 1.0, &m.data[0][0], 1, &C_3_2.data[0][0], 1);
    cblas_daxpy(NSC, -1.0, &m.data[0][0], 1, &C_2_3.data[0][0], 1);
    cblas_daxpy(NSC, 1.0, &m.data[0][0], 1, &C_1_4.data[0][0], 1);
    cblas_daxpy(NSC, 1/8.0, &m.data[0][0], 1, &C_1_5.data[0][0], 1);
    cblas_daxpy(NSC, 1/8.0, &m.data[0][0], 1, &C_2_5.data[0][0], 1);
    cblas_daxpy(NSC, 1.0, &m.data[0][0], 1, &C_2_6.data[0][0], 1);
    cblas_daxpy(NSC, -1.0, &m.data[0][0], 1, &C_3_6.data[0][0], 1);
    for(shape_uint arenai=0; arenai<NSA; arenai++) tmp0.arena[arenai] = 0;
    for(shape_uint arenai=0; arenai<NSB; arenai++) tmp1.arena[arenai] = 0;
    static const int8_t B_coeffs_Bxxeval29[2] = {-1, 1, };
    marr[0]=B_2_3;
    marr[1]=B_3_3;
    matlincomb_double_contiguous(Bxx29, 2, (double_cmat*)marr,  (int8_t*)B_coeffs_Bxxeval29);
    static const int8_t B_coeffs_Bxxeval30[3] = {8, 8, 1, };
    marr[0]=B_1_1;
    marr[1]=B_2_1;
    marr[2]=Bxx29;
    matlincomb_double_contiguous(Bxx30, 3, (double_cmat*)marr,  (int8_t*)B_coeffs_Bxxeval30);
    static const int8_t B_coeffs_Bxxeval31[2] = {1, 1, };
    marr[0]=B_1_2;
    marr[1]=B_3_3;
    matlincomb_double_contiguous(Bxx31, 2, (double_cmat*)marr,  (int8_t*)B_coeffs_Bxxeval31);
    static const int8_t A_coeffs_12[6] = {-1, 1, 1, 1, 1, 1, };
    marr[0]=A_1_1;
    marr[1]=A_1_3;
    marr[2]=A_2_2;
    marr[3]=A_2_3;
    marr[4]=A_3_1;
    marr[5]=A_3_2;
    matlincomb_double_contiguous(tmp0, 6, (double_cmat*)marr, (int8_t*)A_coeffs_12);
    static const int8_t B_coeffs_12[5] = {8, 1, 1, 1, 1, };
    marr[0]=B_2_1;
    marr[1]=Bxx10;
    marr[2]=Bxx19;
    marr[3]=Bxx31;
    marr[4]=Bxx5;
    matlincomb_double_contiguous(tmp1, 5, (double_cmat*)marr, (int8_t*)B_coeffs_12);
    cblas_dscal(NSB, dnum8, &tmp1.data[0][0], 1);
    matmul_double_blas(m, tmp0, tmp1);
    cblas_daxpy(NSC, 1/8.0, &m.data[0][0], 1, &C_3_1.data[0][0], 1);
    cblas_daxpy(NSC, -1.0, &m.data[0][0], 1, &C_1_2.data[0][0], 1);
    cblas_daxpy(NSC, 1.0, &m.data[0][0], 1, &C_3_2.data[0][0], 1);
    cblas_daxpy(NSC, 1.0, &m.data[0][0], 1, &C_2_3.data[0][0], 1);
    cblas_daxpy(NSC, -1.0, &m.data[0][0], 1, &C_1_4.data[0][0], 1);
    cblas_daxpy(NSC, 1/8.0, &m.data[0][0], 1, &C_1_5.data[0][0], 1);
    cblas_daxpy(NSC, 1/8.0, &m.data[0][0], 1, &C_2_5.data[0][0], 1);
    cblas_daxpy(NSC, -1.0, &m.data[0][0], 1, &C_2_6.data[0][0], 1);
    cblas_daxpy(NSC, -1.0, &m.data[0][0], 1, &C_3_6.data[0][0], 1);
    for(shape_uint arenai=0; arenai<NSA; arenai++) tmp0.arena[arenai] = 0;
    for(shape_uint arenai=0; arenai<NSB; arenai++) tmp1.arena[arenai] = 0;
    static const int8_t B_coeffs_Bxxeval32[2] = {-1, 1, };
    marr[0]=B_2_3;
    marr[1]=Bxx31;
    matlincomb_double_contiguous(Bxx32, 2, (double_cmat*)marr,  (int8_t*)B_coeffs_Bxxeval32);
    static const int8_t A_coeffs_9[6] = {-1, 1, 1, -1, -1, 1, };
    marr[0]=A_1_1;
    marr[1]=A_1_3;
    marr[2]=A_2_2;
    marr[3]=A_2_3;
    marr[4]=A_3_1;
    marr[5]=A_3_2;
    matlincomb_double_contiguous(tmp0, 6, (double_cmat*)marr, (int8_t*)A_coeffs_9);
    static const int8_t B_coeffs_9[4] = {1, -1, -1, -1, };
    marr[0]=B_1_4;
    marr[1]=Bxx15;
    marr[2]=Bxx32;
    marr[3]=Bxx9;
    matlincomb_double_contiguous(tmp1, 4, (double_cmat*)marr, (int8_t*)B_coeffs_9);
    cblas_dscal(NSB, dnum8, &tmp1.data[0][0], 1);
    matmul_double_blas(m, tmp0, tmp1);
    cblas_daxpy(NSC, 1/8.0, &m.data[0][0], 1, &C_3_1.data[0][0], 1);
    cblas_daxpy(NSC, 1.0, &m.data[0][0], 1, &C_1_2.data[0][0], 1);
    cblas_daxpy(NSC, 1.0, &m.data[0][0], 1, &C_3_2.data[0][0], 1);
    cblas_daxpy(NSC, 1.0, &m.data[0][0], 1, &C_2_3.data[0][0], 1);
    cblas_daxpy(NSC, -1.0, &m.data[0][0], 1, &C_1_4.data[0][0], 1);
    cblas_daxpy(NSC, -1/8.0, &m.data[0][0], 1, &C_1_5.data[0][0], 1);
    cblas_daxpy(NSC, 1/8.0, &m.data[0][0], 1, &C_2_5.data[0][0], 1);
    cblas_daxpy(NSC, 1.0, &m.data[0][0], 1, &C_2_6.data[0][0], 1);
    cblas_daxpy(NSC, 1.0, &m.data[0][0], 1, &C_3_6.data[0][0], 1);
    for(shape_uint arenai=0; arenai<NSA; arenai++) tmp0.arena[arenai] = 0;
    for(shape_uint arenai=0; arenai<NSB; arenai++) tmp1.arena[arenai] = 0;
    for(shape_uint arenai=0; arenai<NSB; arenai++) Bxx15.arena[arenai] = 0;
    static const int8_t B_coeffs_Bxxeval33[2] = {1, 1, };
    marr[0]=B_2_3;
    marr[1]=B_3_3;
    matlincomb_double_contiguous(Bxx15, 2, (double_cmat*)marr,  (int8_t*)B_coeffs_Bxxeval33);
    static const int8_t B_coeffs_Bxxeval34[2] = {1, 1, };
    marr[0]=Bxx15;
    marr[1]=Bxx18;
    matlincomb_double_contiguous(Bxx33, 2, (double_cmat*)marr,  (int8_t*)B_coeffs_Bxxeval34);
    static const int8_t B_coeffs_Bxxeval35[2] = {-8, 1, };
    marr[0]=B_3_1;
    marr[1]=Bxx15;
    matlincomb_double_contiguous(Bxx34, 2, (double_cmat*)marr,  (int8_t*)B_coeffs_Bxxeval35);
    cblas_dscal(NSB, 1, &Bxx15.data[0][0], 1);
    static const int8_t B_coeffs_Bxxeval36[1] = {8, };
    marr[0]=B_2_1;
    matlincomb_double_contiguous(Bxx15, 1, (double_cmat*)marr,  (int8_t*)B_coeffs_Bxxeval36);
    static const int8_t B_coeffs_Bxxeval37[2] = {-8, 1, };
    marr[0]=B_2_1;
    marr[1]=B_3_3;
    matlincomb_double_contiguous(Bxx35, 2, (double_cmat*)marr,  (int8_t*)B_coeffs_Bxxeval37);
    static const int8_t B_coeffs_Bxxeval38[2] = {-1, 1, };
    marr[0]=B_2_3;
    marr[1]=Bxx35;
    matlincomb_double_contiguous(Bxx36, 2, (double_cmat*)marr,  (int8_t*)B_coeffs_Bxxeval38);
    cblas_dscal(NSB, 1, &Bxx19.data[0][0], 1);
    static const int8_t B_coeffs_Bxxeval39[1] = {1, };
    marr[0]=Bxx35;
    matlincomb_double_contiguous(Bxx19, 1, (double_cmat*)marr,  (int8_t*)B_coeffs_Bxxeval39);
    static const int8_t A_coeffs_10[6] = {-1, -1, 1, 1, 1, -1, };
    marr[0]=A_1_1;
    marr[1]=A_1_3;
    marr[2]=A_2_2;
    marr[3]=A_2_3;
    marr[4]=A_3_1;
    marr[5]=A_3_2;
    matlincomb_double_contiguous(tmp0, 6, (double_cmat*)marr, (int8_t*)A_coeffs_10);
    static const int8_t B_coeffs_10[4] = {1, -1, -1, -1, };
    marr[0]=B_1_2;
    marr[1]=Bxx19;
    marr[2]=Bxx4;
    marr[3]=Bxx8;
    matlincomb_double_contiguous(tmp1, 4, (double_cmat*)marr, (int8_t*)B_coeffs_10);
    cblas_dscal(NSB, dnum8, &tmp1.data[0][0], 1);
    matmul_double_blas(m, tmp0, tmp1);
    cblas_daxpy(NSC, -1/8.0, &m.data[0][0], 1, &C_3_1.data[0][0], 1);
    cblas_daxpy(NSC, -1.0, &m.data[0][0], 1, &C_1_2.data[0][0], 1);
    cblas_daxpy(NSC, 1.0, &m.data[0][0], 1, &C_3_2.data[0][0], 1);
    cblas_daxpy(NSC, -1.0, &m.data[0][0], 1, &C_2_3.data[0][0], 1);
    cblas_daxpy(NSC, 1.0, &m.data[0][0], 1, &C_1_4.data[0][0], 1);
    cblas_daxpy(NSC, -1/8.0, &m.data[0][0], 1, &C_1_5.data[0][0], 1);
    cblas_daxpy(NSC, 1/8.0, &m.data[0][0], 1, &C_2_5.data[0][0], 1);
    cblas_daxpy(NSC, -1.0, &m.data[0][0], 1, &C_2_6.data[0][0], 1);
    cblas_daxpy(NSC, 1.0, &m.data[0][0], 1, &C_3_6.data[0][0], 1);
    for(shape_uint arenai=0; arenai<NSA; arenai++) tmp0.arena[arenai] = 0;
    for(shape_uint arenai=0; arenai<NSB; arenai++) tmp1.arena[arenai] = 0;
    for(shape_uint arenai=0; arenai<NSB; arenai++) Bxx35.arena[arenai] = 0;
    static const int8_t B_coeffs_Bxxeval40[2] = {8, -8, };
    marr[0]=B_1_5;
    marr[1]=B_2_5;
    matlincomb_double_contiguous(Bxx35, 2, (double_cmat*)marr,  (int8_t*)B_coeffs_Bxxeval40);
    static const int8_t A_coeffs_38[4] = {-1, -1, -1, -1, };
    marr[0]=A_1_1;
    marr[1]=A_1_3;
    marr[2]=A_2_1;
    marr[3]=A_2_3;
    matlincomb_double_contiguous(tmp0, 4, (double_cmat*)marr, (int8_t*)A_coeffs_38);
    static const int8_t B_coeffs_38[5] = {-1, -1, -1, 1, 1, };
    marr[0]=B_1_2;
    marr[1]=B_1_4;
    marr[2]=B_3_4;
    marr[3]=Bxx24;
    marr[4]=Bxx35;
    matlincomb_double_contiguous(tmp1, 5, (double_cmat*)marr, (int8_t*)B_coeffs_38);
    cblas_dscal(NSB, dnum8, &tmp1.data[0][0], 1);
    matmul_double_blas(m, tmp0, tmp1);
    cblas_daxpy(NSC, -1/8.0, &m.data[0][0], 1, &C_1_1.data[0][0], 1);
    cblas_daxpy(NSC, -1/8.0, &m.data[0][0], 1, &C_2_1.data[0][0], 1);
    cblas_daxpy(NSC, 1.0, &m.data[0][0], 1, &C_2_2.data[0][0], 1);
    cblas_daxpy(NSC, 1.0, &m.data[0][0], 1, &C_2_3.data[0][0], 1);
    cblas_daxpy(NSC, 1.0, &m.data[0][0], 1, &C_2_4.data[0][0], 1);
    cblas_daxpy(NSC, 1.0, &m.data[0][0], 1, &C_3_4.data[0][0], 1);
    cblas_daxpy(NSC, -1/8.0, &m.data[0][0], 1, &C_1_5.data[0][0], 1);
    cblas_daxpy(NSC, -1/8.0, &m.data[0][0], 1, &C_2_5.data[0][0], 1);
    cblas_daxpy(NSC, -1.0, &m.data[0][0], 1, &C_2_6.data[0][0], 1);
    cblas_daxpy(NSC, 1.0, &m.data[0][0], 1, &C_3_6.data[0][0], 1);
    for(shape_uint arenai=0; arenai<NSA; arenai++) tmp0.arena[arenai] = 0;
    for(shape_uint arenai=0; arenai<NSB; arenai++) tmp1.arena[arenai] = 0;
    static const int8_t B_coeffs_Bxxeval41[3] = {1, -8, -8, };
    marr[0]=B_1_2;
    marr[1]=B_1_5;
    marr[2]=B_2_5;
    matlincomb_double_contiguous(Bxx37, 3, (double_cmat*)marr,  (int8_t*)B_coeffs_Bxxeval41);
    static const int8_t A_coeffs_14[6] = {1, 1, 1, -1, 1, 1, };
    marr[0]=A_1_1;
    marr[1]=A_1_3;
    marr[2]=A_2_2;
    marr[3]=A_2_3;
    marr[4]=A_3_1;
    marr[5]=A_3_2;
    matlincomb_double_contiguous(tmp0, 6, (double_cmat*)marr, (int8_t*)A_coeffs_14);
    static const int8_t B_coeffs_14[4] = {1, 1, 1, 1, };
    marr[0]=Bxx17;
    marr[1]=Bxx25;
    marr[2]=Bxx28;
    marr[3]=Bxx37;
    matlincomb_double_contiguous(tmp1, 4, (double_cmat*)marr, (int8_t*)B_coeffs_14);
    cblas_dscal(NSB, dnum8, &tmp1.data[0][0], 1);
    matmul_double_blas(m, tmp0, tmp1);
    cblas_daxpy(NSC, 1/8.0, &m.data[0][0], 1, &C_1_1.data[0][0], 1);
    cblas_daxpy(NSC, -1/8.0, &m.data[0][0], 1, &C_2_1.data[0][0], 1);
    cblas_daxpy(NSC, 1.0, &m.data[0][0], 1, &C_1_2.data[0][0], 1);
    cblas_daxpy(NSC, 1.0, &m.data[0][0], 1, &C_3_2.data[0][0], 1);
    cblas_daxpy(NSC, 1.0, &m.data[0][0], 1, &C_2_3.data[0][0], 1);
    cblas_daxpy(NSC, -1.0, &m.data[0][0], 1, &C_2_4.data[0][0], 1);
    cblas_daxpy(NSC, -1.0, &m.data[0][0], 1, &C_3_4.data[0][0], 1);
    cblas_daxpy(NSC, -1/8.0, &m.data[0][0], 1, &C_3_5.data[0][0], 1);
    cblas_daxpy(NSC, 1.0, &m.data[0][0], 1, &C_1_6.data[0][0], 1);
    for(shape_uint arenai=0; arenai<NSA; arenai++) tmp0.arena[arenai] = 0;
    for(shape_uint arenai=0; arenai<NSB; arenai++) tmp1.arena[arenai] = 0;
    static const int8_t A_coeffs_25[4] = {-1, -1, -1, -1, };
    marr[0]=A_2_1;
    marr[1]=A_2_2;
    marr[2]=A_3_1;
    marr[3]=A_3_2;
    matlincomb_double_contiguous(tmp0, 4, (double_cmat*)marr, (int8_t*)A_coeffs_25);
    static const int8_t B_coeffs_25[3] = {-1, -1, -1, };
    marr[0]=Bxx2;
    marr[1]=Bxx24;
    marr[2]=Bxx37;
    matlincomb_double_contiguous(tmp1, 3, (double_cmat*)marr, (int8_t*)B_coeffs_25);
    cblas_dscal(NSB, dnum8, &tmp1.data[0][0], 1);
    matmul_double_blas(m, tmp0, tmp1);
    cblas_daxpy(NSC, -1/8.0, &m.data[0][0], 1, &C_1_1.data[0][0], 1);
    cblas_daxpy(NSC, 1/8.0, &m.data[0][0], 1, &C_2_1.data[0][0], 1);
    cblas_daxpy(NSC, 1.0, &m.data[0][0], 1, &C_2_2.data[0][0], 1);
    cblas_daxpy(NSC, -1.0, &m.data[0][0], 1, &C_2_3.data[0][0], 1);
    cblas_daxpy(NSC, 1.0, &m.data[0][0], 1, &C_2_4.data[0][0], 1);
    cblas_daxpy(NSC, 1.0, &m.data[0][0], 1, &C_3_4.data[0][0], 1);
    cblas_daxpy(NSC, -1/8.0, &m.data[0][0], 1, &C_1_5.data[0][0], 1);
    cblas_daxpy(NSC, -1/8.0, &m.data[0][0], 1, &C_2_5.data[0][0], 1);
    cblas_daxpy(NSC, 1.0, &m.data[0][0], 1, &C_2_6.data[0][0], 1);
    cblas_daxpy(NSC, 1.0, &m.data[0][0], 1, &C_3_6.data[0][0], 1);
    for(shape_uint arenai=0; arenai<NSA; arenai++) tmp0.arena[arenai] = 0;
    for(shape_uint arenai=0; arenai<NSB; arenai++) tmp1.arena[arenai] = 0;
    for(shape_uint arenai=0; arenai<NSB; arenai++) Bxx37.arena[arenai] = 0;
    static const int8_t B_coeffs_Bxxeval42[2] = {1, 1, };
    marr[0]=B_2_4;
    marr[1]=Bxx35;
    matlincomb_double_contiguous(Bxx37, 2, (double_cmat*)marr,  (int8_t*)B_coeffs_Bxxeval42);
    static const int8_t A_coeffs_13[6] = {1, 1, 1, 1, -1, 1, };
    marr[0]=A_1_1;
    marr[1]=A_1_3;
    marr[2]=A_2_2;
    marr[3]=A_2_3;
    marr[4]=A_3_1;
    marr[5]=A_3_2;
    matlincomb_double_contiguous(tmp0, 6, (double_cmat*)marr, (int8_t*)A_coeffs_13);
    static const int8_t B_coeffs_13[3] = {1, 1, 1, };
    marr[0]=Bxx14;
    marr[1]=Bxx34;
    marr[2]=Bxx37;
    matlincomb_double_contiguous(tmp1, 3, (double_cmat*)marr, (int8_t*)B_coeffs_13);
    cblas_dscal(NSB, dnum8, &tmp1.data[0][0], 1);
    matmul_double_blas(m, tmp0, tmp1);
    cblas_daxpy(NSC, -1/8.0, &m.data[0][0], 1, &C_1_1.data[0][0], 1);
    cblas_daxpy(NSC, -1/8.0, &m.data[0][0], 1, &C_2_1.data[0][0], 1);
    cblas_daxpy(NSC, -1.0, &m.data[0][0], 1, &C_1_2.data[0][0], 1);
    cblas_daxpy(NSC, 1.0, &m.data[0][0], 1, &C_3_2.data[0][0], 1);
    cblas_daxpy(NSC, 1.0, &m.data[0][0], 1, &C_2_3.data[0][0], 1);
    cblas_daxpy(NSC, 1.0, &m.data[0][0], 1, &C_2_4.data[0][0], 1);
    cblas_daxpy(NSC, 1.0, &m.data[0][0], 1, &C_3_4.data[0][0], 1);
    cblas_daxpy(NSC, -1/8.0, &m.data[0][0], 1, &C_3_5.data[0][0], 1);
    cblas_daxpy(NSC, 1.0, &m.data[0][0], 1, &C_1_6.data[0][0], 1);
    for(shape_uint arenai=0; arenai<NSA; arenai++) tmp0.arena[arenai] = 0;
    for(shape_uint arenai=0; arenai<NSB; arenai++) tmp1.arena[arenai] = 0;
    for(shape_uint arenai=0; arenai<NSB; arenai++) Bxx17.arena[arenai] = 0;
    static const int8_t B_coeffs_Bxxeval43[2] = {-1, 1, };
    marr[0]=B_2_4;
    marr[1]=Bxx35;
    matlincomb_double_contiguous(Bxx17, 2, (double_cmat*)marr,  (int8_t*)B_coeffs_Bxxeval43);
    for(shape_uint arenai=0; arenai<NSB; arenai++) Bxx24.arena[arenai] = 0;
    static const int8_t B_coeffs_Bxxeval44[2] = {8, 1, };
    marr[0]=B_3_1;
    marr[1]=Bxx35;
    matlincomb_double_contiguous(Bxx24, 2, (double_cmat*)marr,  (int8_t*)B_coeffs_Bxxeval44);
    static const int8_t A_coeffs_16[6] = {-1, 1, -1, 1, -1, 1, };
    marr[0]=A_1_1;
    marr[1]=A_1_3;
    marr[2]=A_2_2;
    marr[3]=A_2_3;
    marr[4]=A_3_1;
    marr[5]=A_3_2;
    matlincomb_double_contiguous(tmp0, 6, (double_cmat*)marr, (int8_t*)A_coeffs_16);
    static const int8_t B_coeffs_16[4] = {1, -1, -1, -1, };
    marr[0]=B_1_6;
    marr[1]=Bxx24;
    marr[2]=Bxx25;
    marr[3]=Bxx32;
    matlincomb_double_contiguous(tmp1, 4, (double_cmat*)marr, (int8_t*)B_coeffs_16);
    cblas_dscal(NSB, dnum8, &tmp1.data[0][0], 1);
    matmul_double_blas(m, tmp0, tmp1);
    cblas_daxpy(NSC, -1/8.0, &m.data[0][0], 1, &C_1_1.data[0][0], 1);
    cblas_daxpy(NSC, -1/8.0, &m.data[0][0], 1, &C_2_1.data[0][0], 1);
    cblas_daxpy(NSC, 1.0, &m.data[0][0], 1, &C_1_2.data[0][0], 1);
    cblas_daxpy(NSC, 1.0, &m.data[0][0], 1, &C_3_2.data[0][0], 1);
    cblas_daxpy(NSC, -1.0, &m.data[0][0], 1, &C_2_3.data[0][0], 1);
    cblas_daxpy(NSC, -1.0, &m.data[0][0], 1, &C_2_4.data[0][0], 1);
    cblas_daxpy(NSC, 1.0, &m.data[0][0], 1, &C_3_4.data[0][0], 1);
    cblas_daxpy(NSC, 1/8.0, &m.data[0][0], 1, &C_3_5.data[0][0], 1);
    cblas_daxpy(NSC, -1.0, &m.data[0][0], 1, &C_1_6.data[0][0], 1);
    for(shape_uint arenai=0; arenai<NSA; arenai++) tmp0.arena[arenai] = 0;
    for(shape_uint arenai=0; arenai<NSB; arenai++) tmp1.arena[arenai] = 0;
    cblas_dscal(NSB, 1, &Bxx20.data[0][0], 1);
    static const int8_t B_coeffs_Bxxeval45[2] = {1, 1, };
    marr[0]=Bxx2;
    marr[1]=Bxx35;
    matlincomb_double_contiguous(Bxx20, 2, (double_cmat*)marr,  (int8_t*)B_coeffs_Bxxeval45);
    static const int8_t A_coeffs_26[4] = {-1, 1, -1, 1, };
    marr[0]=A_2_1;
    marr[1]=A_2_2;
    marr[2]=A_3_1;
    marr[3]=A_3_2;
    matlincomb_double_contiguous(tmp0, 4, (double_cmat*)marr, (int8_t*)A_coeffs_26);
    static const int8_t B_coeffs_26[3] = {-8, 1, 1, };
    marr[0]=B_1_1;
    marr[1]=Bxx14;
    marr[2]=Bxx20;
    matlincomb_double_contiguous(tmp1, 3, (double_cmat*)marr, (int8_t*)B_coeffs_26);
    cblas_dscal(NSB, dnum8, &tmp1.data[0][0], 1);
    matmul_double_blas(m, tmp0, tmp1);
    cblas_daxpy(NSC, 1/8.0, &m.data[0][0], 1, &C_1_1.data[0][0], 1);
    cblas_daxpy(NSC, 1/8.0, &m.data[0][0], 1, &C_2_1.data[0][0], 1);
    cblas_daxpy(NSC, 1.0, &m.data[0][0], 1, &C_2_2.data[0][0], 1);
    cblas_daxpy(NSC, -1.0, &m.data[0][0], 1, &C_2_3.data[0][0], 1);
    cblas_daxpy(NSC, -1.0, &m.data[0][0], 1, &C_2_4.data[0][0], 1);
    cblas_daxpy(NSC, -1.0, &m.data[0][0], 1, &C_3_4.data[0][0], 1);
    cblas_daxpy(NSC, 1/8.0, &m.data[0][0], 1, &C_1_5.data[0][0], 1);
    cblas_daxpy(NSC, -1/8.0, &m.data[0][0], 1, &C_2_5.data[0][0], 1);
    cblas_daxpy(NSC, -1.0, &m.data[0][0], 1, &C_2_6.data[0][0], 1);
    cblas_daxpy(NSC, -1.0, &m.data[0][0], 1, &C_3_6.data[0][0], 1);
    for(shape_uint arenai=0; arenai<NSA; arenai++) tmp0.arena[arenai] = 0;
    for(shape_uint arenai=0; arenai<NSB; arenai++) tmp1.arena[arenai] = 0;
    static const int8_t A_coeffs_39[4] = {1, -1, 1, -1, };
    marr[0]=A_1_1;
    marr[1]=A_1_3;
    marr[2]=A_2_1;
    marr[3]=A_2_3;
    matlincomb_double_contiguous(tmp0, 4, (double_cmat*)marr, (int8_t*)A_coeffs_39);
    static const int8_t B_coeffs_39[4] = {8, 1, 1, 1, };
    marr[0]=B_1_1;
    marr[1]=B_1_2;
    marr[2]=Bxx20;
    marr[3]=Bxx7;
    matlincomb_double_contiguous(tmp1, 4, (double_cmat*)marr, (int8_t*)B_coeffs_39);
    cblas_dscal(NSB, dnum8, &tmp1.data[0][0], 1);
    matmul_double_blas(m, tmp0, tmp1);
    cblas_daxpy(NSC, 1/8.0, &m.data[0][0], 1, &C_1_1.data[0][0], 1);
    cblas_daxpy(NSC, 1/8.0, &m.data[0][0], 1, &C_2_1.data[0][0], 1);
    cblas_daxpy(NSC, 1.0, &m.data[0][0], 1, &C_2_2.data[0][0], 1);
    cblas_daxpy(NSC, 1.0, &m.data[0][0], 1, &C_2_3.data[0][0], 1);
    cblas_daxpy(NSC, 1.0, &m.data[0][0], 1, &C_2_4.data[0][0], 1);
    cblas_daxpy(NSC, -1.0, &m.data[0][0], 1, &C_3_4.data[0][0], 1);
    cblas_daxpy(NSC, 1/8.0, &m.data[0][0], 1, &C_1_5.data[0][0], 1);
    cblas_daxpy(NSC, 1/8.0, &m.data[0][0], 1, &C_2_5.data[0][0], 1);
    cblas_daxpy(NSC, -1.0, &m.data[0][0], 1, &C_2_6.data[0][0], 1);
    cblas_daxpy(NSC, -1.0, &m.data[0][0], 1, &C_3_6.data[0][0], 1);
    for(shape_uint arenai=0; arenai<NSA; arenai++) tmp0.arena[arenai] = 0;
    for(shape_uint arenai=0; arenai<NSB; arenai++) tmp1.arena[arenai] = 0;
    for(shape_uint arenai=0; arenai<NSB; arenai++) Bxx32.arena[arenai] = 0;
    static const int8_t B_coeffs_Bxxeval46[2] = {8, 1, };
    marr[0]=B_2_5;
    marr[1]=B_3_4;
    matlincomb_double_contiguous(Bxx32, 2, (double_cmat*)marr,  (int8_t*)B_coeffs_Bxxeval46);
    for(shape_uint arenai=0; arenai<NSB; arenai++) Bxx14.arena[arenai] = 0;
    static const int8_t B_coeffs_Bxxeval47[2] = {-8, 1, };
    marr[0]=B_1_5;
    marr[1]=Bxx32;
    matlincomb_double_contiguous(Bxx14, 2, (double_cmat*)marr,  (int8_t*)B_coeffs_Bxxeval47);
    static const int8_t A_coeffs_27[4] = {-1, 1, 1, -1, };
    marr[0]=A_2_1;
    marr[1]=A_2_2;
    marr[2]=A_3_1;
    marr[3]=A_3_2;
    matlincomb_double_contiguous(tmp0, 4, (double_cmat*)marr, (int8_t*)A_coeffs_27);
    static const int8_t B_coeffs_27[3] = {-1, -1, -1, };
    marr[0]=Bxx1;
    marr[1]=Bxx14;
    marr[2]=Bxx23;
    matlincomb_double_contiguous(tmp1, 3, (double_cmat*)marr, (int8_t*)B_coeffs_27);
    cblas_dscal(NSB, dnum8, &tmp1.data[0][0], 1);
    matmul_double_blas(m, tmp0, tmp1);
    cblas_daxpy(NSC, 1/8.0, &m.data[0][0], 1, &C_1_1.data[0][0], 1);
    cblas_daxpy(NSC, 1/8.0, &m.data[0][0], 1, &C_2_1.data[0][0], 1);
    cblas_daxpy(NSC, -1.0, &m.data[0][0], 1, &C_2_2.data[0][0], 1);
    cblas_daxpy(NSC, 1.0, &m.data[0][0], 1, &C_2_3.data[0][0], 1);
    cblas_daxpy(NSC, 1.0, &m.data[0][0], 1, &C_2_4.data[0][0], 1);
    cblas_daxpy(NSC, -1.0, &m.data[0][0], 1, &C_3_4.data[0][0], 1);
    cblas_daxpy(NSC, 1/8.0, &m.data[0][0], 1, &C_1_5.data[0][0], 1);
    cblas_daxpy(NSC, -1/8.0, &m.data[0][0], 1, &C_2_5.data[0][0], 1);
    cblas_daxpy(NSC, 1.0, &m.data[0][0], 1, &C_2_6.data[0][0], 1);
    cblas_daxpy(NSC, -1.0, &m.data[0][0], 1, &C_3_6.data[0][0], 1);
    for(shape_uint arenai=0; arenai<NSA; arenai++) tmp0.arena[arenai] = 0;
    for(shape_uint arenai=0; arenai<NSB; arenai++) tmp1.arena[arenai] = 0;
    for(shape_uint arenai=0; arenai<NSB; arenai++) Bxx2.arena[arenai] = 0;
    static const int8_t B_coeffs_Bxxeval48[2] = {8, 1, };
    marr[0]=B_1_5;
    marr[1]=Bxx32;
    matlincomb_double_contiguous(Bxx2, 2, (double_cmat*)marr,  (int8_t*)B_coeffs_Bxxeval48);
    for(shape_uint arenai=0; arenai<NSB; arenai++) Bxx35.arena[arenai] = 0;
    static const int8_t B_coeffs_Bxxeval49[2] = {-1, 1, };
    marr[0]=B_1_4;
    marr[1]=Bxx2;
    matlincomb_double_contiguous(Bxx35, 2, (double_cmat*)marr,  (int8_t*)B_coeffs_Bxxeval49);
    static const int8_t A_coeffs_37[4] = {-1, 1, 1, -1, };
    marr[0]=A_1_1;
    marr[1]=A_1_3;
    marr[2]=A_2_1;
    marr[3]=A_2_3;
    matlincomb_double_contiguous(tmp0, 4, (double_cmat*)marr, (int8_t*)A_coeffs_37);
    static const int8_t B_coeffs_37[3] = {1, 1, 1, };
    marr[0]=B_1_2;
    marr[1]=Bxx23;
    marr[2]=Bxx35;
    matlincomb_double_contiguous(tmp1, 3, (double_cmat*)marr, (int8_t*)B_coeffs_37);
    cblas_dscal(NSB, dnum8, &tmp1.data[0][0], 1);
    matmul_double_blas(m, tmp0, tmp1);
    cblas_daxpy(NSC, -1/8.0, &m.data[0][0], 1, &C_1_1.data[0][0], 1);
    cblas_daxpy(NSC, 1/8.0, &m.data[0][0], 1, &C_2_1.data[0][0], 1);
    cblas_daxpy(NSC, 1.0, &m.data[0][0], 1, &C_2_2.data[0][0], 1);
    cblas_daxpy(NSC, 1.0, &m.data[0][0], 1, &C_2_3.data[0][0], 1);
    cblas_daxpy(NSC, -1.0, &m.data[0][0], 1, &C_2_4.data[0][0], 1);
    cblas_daxpy(NSC, 1.0, &m.data[0][0], 1, &C_3_4.data[0][0], 1);
    cblas_daxpy(NSC, -1/8.0, &m.data[0][0], 1, &C_1_5.data[0][0], 1);
    cblas_daxpy(NSC, 1/8.0, &m.data[0][0], 1, &C_2_5.data[0][0], 1);
    cblas_daxpy(NSC, 1.0, &m.data[0][0], 1, &C_2_6.data[0][0], 1);
    cblas_daxpy(NSC, 1.0, &m.data[0][0], 1, &C_3_6.data[0][0], 1);
    for(shape_uint arenai=0; arenai<NSA; arenai++) tmp0.arena[arenai] = 0;
    for(shape_uint arenai=0; arenai<NSB; arenai++) tmp1.arena[arenai] = 0;
    for(shape_uint arenai=0; arenai<NSB; arenai++) Bxx23.arena[arenai] = 0;
    static const int8_t B_coeffs_Bxxeval50[3] = {-1, 1, 1, };
    marr[0]=B_1_3;
    marr[1]=Bxx16;
    marr[2]=Bxx2;
    matlincomb_double_contiguous(Bxx23, 3, (double_cmat*)marr,  (int8_t*)B_coeffs_Bxxeval50);
    static const int8_t A_coeffs_28[4] = {-1, -1, 1, 1, };
    marr[0]=A_2_1;
    marr[1]=A_2_2;
    marr[2]=A_3_1;
    marr[3]=A_3_2;
    matlincomb_double_contiguous(tmp0, 4, (double_cmat*)marr, (int8_t*)A_coeffs_28);
    static const int8_t B_coeffs_28[4] = {-1, -1, -1, -1, };
    marr[0]=B_1_4;
    marr[1]=B_1_6;
    marr[2]=Bxx23;
    marr[3]=Bxx3;
    matlincomb_double_contiguous(tmp1, 4, (double_cmat*)marr, (int8_t*)B_coeffs_28);
    cblas_dscal(NSB, dnum8, &tmp1.data[0][0], 1);
    matmul_double_blas(m, tmp0, tmp1);
    cblas_daxpy(NSC, 1/8.0, &m.data[0][0], 1, &C_1_1.data[0][0], 1);
    cblas_daxpy(NSC, -1/8.0, &m.data[0][0], 1, &C_2_1.data[0][0], 1);
    cblas_daxpy(NSC, 1.0, &m.data[0][0], 1, &C_2_2.data[0][0], 1);
    cblas_daxpy(NSC, -1.0, &m.data[0][0], 1, &C_2_3.data[0][0], 1);
    cblas_daxpy(NSC, 1.0, &m.data[0][0], 1, &C_2_4.data[0][0], 1);
    cblas_daxpy(NSC, -1.0, &m.data[0][0], 1, &C_3_4.data[0][0], 1);
    cblas_daxpy(NSC, 1/8.0, &m.data[0][0], 1, &C_1_5.data[0][0], 1);
    cblas_daxpy(NSC, 1/8.0, &m.data[0][0], 1, &C_2_5.data[0][0], 1);
    cblas_daxpy(NSC, 1.0, &m.data[0][0], 1, &C_2_6.data[0][0], 1);
    cblas_daxpy(NSC, -1.0, &m.data[0][0], 1, &C_3_6.data[0][0], 1);
    for(shape_uint arenai=0; arenai<NSA; arenai++) tmp0.arena[arenai] = 0;
    for(shape_uint arenai=0; arenai<NSB; arenai++) tmp1.arena[arenai] = 0;
    static const int8_t A_coeffs_40[4] = {-1, -1, 1, 1, };
    marr[0]=A_1_1;
    marr[1]=A_1_3;
    marr[2]=A_2_1;
    marr[3]=A_2_3;
    matlincomb_double_contiguous(tmp0, 4, (double_cmat*)marr, (int8_t*)A_coeffs_40);
    static const int8_t B_coeffs_40[4] = {-8, 1, -1, -1, };
    marr[0]=B_1_1;
    marr[1]=B_1_6;
    marr[2]=Bxx1;
    marr[3]=Bxx23;
    matlincomb_double_contiguous(tmp1, 4, (double_cmat*)marr, (int8_t*)B_coeffs_40);
    cblas_dscal(NSB, dnum8, &tmp1.data[0][0], 1);
    matmul_double_blas(m, tmp0, tmp1);
    cblas_daxpy(NSC, 1/8.0, &m.data[0][0], 1, &C_1_1.data[0][0], 1);
    cblas_daxpy(NSC, -1/8.0, &m.data[0][0], 1, &C_2_1.data[0][0], 1);
    cblas_daxpy(NSC, 1.0, &m.data[0][0], 1, &C_2_2.data[0][0], 1);
    cblas_daxpy(NSC, 1.0, &m.data[0][0], 1, &C_2_3.data[0][0], 1);
    cblas_daxpy(NSC, -1.0, &m.data[0][0], 1, &C_2_4.data[0][0], 1);
    cblas_daxpy(NSC, -1.0, &m.data[0][0], 1, &C_3_4.data[0][0], 1);
    cblas_daxpy(NSC, 1/8.0, &m.data[0][0], 1, &C_1_5.data[0][0], 1);
    cblas_daxpy(NSC, -1/8.0, &m.data[0][0], 1, &C_2_5.data[0][0], 1);
    cblas_daxpy(NSC, 1.0, &m.data[0][0], 1, &C_2_6.data[0][0], 1);
    cblas_daxpy(NSC, -1.0, &m.data[0][0], 1, &C_3_6.data[0][0], 1);
    for(shape_uint arenai=0; arenai<NSA; arenai++) tmp0.arena[arenai] = 0;
    for(shape_uint arenai=0; arenai<NSB; arenai++) tmp1.arena[arenai] = 0;
    for(shape_uint arenai=0; arenai<NSB; arenai++) Bxx16.arena[arenai] = 0;
    static const int8_t B_coeffs_Bxxeval51[2] = {8, 8, };
    marr[0]=B_1_5;
    marr[1]=B_2_5;
    matlincomb_double_contiguous(Bxx16, 2, (double_cmat*)marr,  (int8_t*)B_coeffs_Bxxeval51);
    for(shape_uint arenai=0; arenai<NSB; arenai++) Bxx32.arena[arenai] = 0;
    static const int8_t B_coeffs_Bxxeval52[2] = {1, 1, };
    marr[0]=B_2_4;
    marr[1]=Bxx16;
    matlincomb_double_contiguous(Bxx32, 2, (double_cmat*)marr,  (int8_t*)B_coeffs_Bxxeval52);
    for(shape_uint arenai=0; arenai<NSB; arenai++) Bxx3.arena[arenai] = 0;
    static const int8_t B_coeffs_Bxxeval53[2] = {-1, 1, };
    marr[0]=B_2_4;
    marr[1]=Bxx16;
    matlincomb_double_contiguous(Bxx3, 2, (double_cmat*)marr,  (int8_t*)B_coeffs_Bxxeval53);
    static const int8_t A_coeffs_15[6] = {-1, 1, -1, -1, 1, 1, };
    marr[0]=A_1_1;
    marr[1]=A_1_3;
    marr[2]=A_2_2;
    marr[3]=A_2_3;
    marr[4]=A_3_1;
    marr[5]=A_3_2;
    matlincomb_double_contiguous(tmp0, 6, (double_cmat*)marr, (int8_t*)A_coeffs_15);
    static const int8_t B_coeffs_15[4] = {-1, -1, -1, -1, };
    marr[0]=B_2_3;
    marr[1]=Bxx18;
    marr[2]=Bxx3;
    marr[3]=Bxx31;
    matlincomb_double_contiguous(tmp1, 4, (double_cmat*)marr, (int8_t*)B_coeffs_15);
    cblas_dscal(NSB, dnum8, &tmp1.data[0][0], 1);
    matmul_double_blas(m, tmp0, tmp1);
    cblas_daxpy(NSC, -1/8.0, &m.data[0][0], 1, &C_1_1.data[0][0], 1);
    cblas_daxpy(NSC, 1/8.0, &m.data[0][0], 1, &C_2_1.data[0][0], 1);
    cblas_daxpy(NSC, 1.0, &m.data[0][0], 1, &C_1_2.data[0][0], 1);
    cblas_daxpy(NSC, -1.0, &m.data[0][0], 1, &C_3_2.data[0][0], 1);
    cblas_daxpy(NSC, 1.0, &m.data[0][0], 1, &C_2_3.data[0][0], 1);
    cblas_daxpy(NSC, -1.0, &m.data[0][0], 1, &C_2_4.data[0][0], 1);
    cblas_daxpy(NSC, 1.0, &m.data[0][0], 1, &C_3_4.data[0][0], 1);
    cblas_daxpy(NSC, -1/8.0, &m.data[0][0], 1, &C_3_5.data[0][0], 1);
    cblas_daxpy(NSC, 1.0, &m.data[0][0], 1, &C_1_6.data[0][0], 1);
    for(shape_uint arenai=0; arenai<NSA; arenai++) tmp0.arena[arenai] = 0;
    for(shape_uint arenai=0; arenai<NSB; arenai++) tmp1.arena[arenai] = 0;
    for(shape_uint arenai=0; arenai<NSB; arenai++) Bxx1.arena[arenai] = 0;
    static const int8_t B_coeffs_Bxxeval54[2] = {-1, -1, };
    marr[0]=B_2_2;
    marr[1]=B_3_2;
    matlincomb_double_contiguous(Bxx1, 2, (double_cmat*)marr,  (int8_t*)B_coeffs_Bxxeval54);
    static const int8_t A_coeffs_3[6] = {1, 1, 1, 1, 1, -1, };
    marr[0]=A_1_1;
    marr[1]=A_1_3;
    marr[2]=A_2_2;
    marr[3]=A_2_3;
    marr[4]=A_3_1;
    marr[5]=A_3_2;
    matlincomb_double_contiguous(tmp0, 6, (double_cmat*)marr, (int8_t*)A_coeffs_3);
    static const int8_t B_coeffs_3[4] = {-1, -1, -1, -1, };
    marr[0]=Bxx1;
    marr[1]=Bxx14;
    marr[2]=Bxx6;
    marr[3]=Bxx8;
    matlincomb_double_contiguous(tmp1, 4, (double_cmat*)marr, (int8_t*)B_coeffs_3);
    cblas_dscal(NSB, dnum8, &tmp1.data[0][0], 1);
    matmul_double_blas(m, tmp0, tmp1);
    cblas_daxpy(NSC, -1/8.0, &m.data[0][0], 1, &C_1_1.data[0][0], 1);
    cblas_daxpy(NSC, -1/8.0, &m.data[0][0], 1, &C_2_1.data[0][0], 1);
    cblas_daxpy(NSC, 1.0, &m.data[0][0], 1, &C_2_2.data[0][0], 1);
    cblas_daxpy(NSC, -1.0, &m.data[0][0], 1, &C_1_3.data[0][0], 1);
    cblas_daxpy(NSC, -1.0, &m.data[0][0], 1, &C_3_3.data[0][0], 1);
    cblas_daxpy(NSC, -1.0, &m.data[0][0], 1, &C_1_4.data[0][0], 1);
    cblas_daxpy(NSC, 1/8.0, &m.data[0][0], 1, &C_3_5.data[0][0], 1);
    cblas_daxpy(NSC, -1.0, &m.data[0][0], 1, &C_2_6.data[0][0], 1);
    cblas_daxpy(NSC, 1.0, &m.data[0][0], 1, &C_3_6.data[0][0], 1);
    for(shape_uint arenai=0; arenai<NSA; arenai++) tmp0.arena[arenai] = 0;
    for(shape_uint arenai=0; arenai<NSB; arenai++) tmp1.arena[arenai] = 0;
    static const int8_t A_coeffs_31[4] = {-1, -1, 1, 1, };
    marr[0]=A_2_2;
    marr[1]=A_2_3;
    marr[2]=A_3_2;
    marr[3]=A_3_3;
    matlincomb_double_contiguous(tmp0, 4, (double_cmat*)marr, (int8_t*)A_coeffs_31);
    static const int8_t B_coeffs_31[4] = {1, 1, 1, 1, };
    marr[0]=B_1_4;
    marr[1]=Bxx1;
    marr[2]=Bxx33;
    marr[3]=Bxx4;
    matlincomb_double_contiguous(tmp1, 4, (double_cmat*)marr, (int8_t*)B_coeffs_31);
    cblas_dscal(NSB, dnum8, &tmp1.data[0][0], 1);
    matmul_double_blas(m, tmp0, tmp1);
    cblas_daxpy(NSC, 1/8.0, &m.data[0][0], 1, &C_3_1.data[0][0], 1);
    cblas_daxpy(NSC, 1.0, &m.data[0][0], 1, &C_1_2.data[0][0], 1);
    cblas_daxpy(NSC, -1.0, &m.data[0][0], 1, &C_3_2.data[0][0], 1);
    cblas_daxpy(NSC, 1.0, &m.data[0][0], 1, &C_1_3.data[0][0], 1);
    cblas_daxpy(NSC, 1.0, &m.data[0][0], 1, &C_3_3.data[0][0], 1);
    cblas_daxpy(NSC, -1.0, &m.data[0][0], 1, &C_2_4.data[0][0], 1);
    cblas_daxpy(NSC, 1.0, &m.data[0][0], 1, &C_3_4.data[0][0], 1);
    cblas_daxpy(NSC, -1/8.0, &m.data[0][0], 1, &C_3_5.data[0][0], 1);
    cblas_daxpy(NSC, 1.0, &m.data[0][0], 1, &C_2_6.data[0][0], 1);
    cblas_daxpy(NSC, -1.0, &m.data[0][0], 1, &C_3_6.data[0][0], 1);
    for(shape_uint arenai=0; arenai<NSA; arenai++) tmp0.arena[arenai] = 0;
    for(shape_uint arenai=0; arenai<NSB; arenai++) tmp1.arena[arenai] = 0;
    for(shape_uint arenai=0; arenai<NSB; arenai++) Bxx20.arena[arenai] = 0;
    static const int8_t B_coeffs_Bxxeval55[2] = {1, 1, };
    marr[0]=B_2_2;
    marr[1]=B_3_2;
    matlincomb_double_contiguous(Bxx20, 2, (double_cmat*)marr,  (int8_t*)B_coeffs_Bxxeval55);
    static const int8_t A_coeffs_19[4] = {1, -1, 1, -1, };
    marr[0]=A_1_1;
    marr[1]=A_1_3;
    marr[2]=A_3_1;
    marr[3]=A_3_3;
    matlincomb_double_contiguous(tmp0, 4, (double_cmat*)marr, (int8_t*)A_coeffs_19);
    static const int8_t B_coeffs_19[5] = {1, -1, -1, -1, -1, };
    marr[0]=B_1_4;
    marr[1]=Bxx12;
    marr[2]=Bxx20;
    marr[3]=Bxx29;
    marr[4]=Bxx7;
    matlincomb_double_contiguous(tmp1, 5, (double_cmat*)marr, (int8_t*)B_coeffs_19);
    cblas_dscal(NSB, dnum8, &tmp1.data[0][0], 1);
    matmul_double_blas(m, tmp0, tmp1);
    cblas_daxpy(NSC, 1/8.0, &m.data[0][0], 1, &C_3_1.data[0][0], 1);
    cblas_daxpy(NSC, 1.0, &m.data[0][0], 1, &C_1_2.data[0][0], 1);
    cblas_daxpy(NSC, 1.0, &m.data[0][0], 1, &C_3_2.data[0][0], 1);
    cblas_daxpy(NSC, 1.0, &m.data[0][0], 1, &C_1_3.data[0][0], 1);
    cblas_daxpy(NSC, 1.0, &m.data[0][0], 1, &C_3_3.data[0][0], 1);
    cblas_daxpy(NSC, -1.0, &m.data[0][0], 1, &C_2_4.data[0][0], 1);
    cblas_daxpy(NSC, 1.0, &m.data[0][0], 1, &C_3_4.data[0][0], 1);
    cblas_daxpy(NSC, 1/8.0, &m.data[0][0], 1, &C_3_5.data[0][0], 1);
    cblas_daxpy(NSC, 1.0, &m.data[0][0], 1, &C_2_6.data[0][0], 1);
    cblas_daxpy(NSC, 1.0, &m.data[0][0], 1, &C_3_6.data[0][0], 1);
    for(shape_uint arenai=0; arenai<NSA; arenai++) tmp0.arena[arenai] = 0;
    for(shape_uint arenai=0; arenai<NSB; arenai++) tmp1.arena[arenai] = 0;
    for(shape_uint arenai=0; arenai<NSB; arenai++) Bxx23.arena[arenai] = 0;
    static const int8_t B_coeffs_Bxxeval56[2] = {1, 1, };
    marr[0]=B_2_6;
    marr[1]=Bxx20;
    matlincomb_double_contiguous(Bxx23, 2, (double_cmat*)marr,  (int8_t*)B_coeffs_Bxxeval56);
    static const int8_t A_coeffs_4[6] = {1, -1, 1, 1, 1, 1, };
    marr[0]=A_1_1;
    marr[1]=A_1_3;
    marr[2]=A_2_2;
    marr[3]=A_2_3;
    marr[4]=A_3_1;
    marr[5]=A_3_2;
    matlincomb_double_contiguous(tmp0, 6, (double_cmat*)marr, (int8_t*)A_coeffs_4);
    static const int8_t B_coeffs_4[3] = {1, 1, 1, };
    marr[0]=Bxx23;
    marr[1]=Bxx35;
    marr[2]=Bxx6;
    matlincomb_double_contiguous(tmp1, 3, (double_cmat*)marr, (int8_t*)B_coeffs_4);
    cblas_dscal(NSB, dnum8, &tmp1.data[0][0], 1);
    matmul_double_blas(m, tmp0, tmp1);
    cblas_daxpy(NSC, -1/8.0, &m.data[0][0], 1, &C_1_1.data[0][0], 1);
    cblas_daxpy(NSC, 1/8.0, &m.data[0][0], 1, &C_2_1.data[0][0], 1);
    cblas_daxpy(NSC, 1.0, &m.data[0][0], 1, &C_2_2.data[0][0], 1);
    cblas_daxpy(NSC, 1.0, &m.data[0][0], 1, &C_1_3.data[0][0], 1);
    cblas_daxpy(NSC, 1.0, &m.data[0][0], 1, &C_3_3.data[0][0], 1);
    cblas_daxpy(NSC, -1.0, &m.data[0][0], 1, &C_1_4.data[0][0], 1);
    cblas_daxpy(NSC, 1/8.0, &m.data[0][0], 1, &C_3_5.data[0][0], 1);
    cblas_daxpy(NSC, 1.0, &m.data[0][0], 1, &C_2_6.data[0][0], 1);
    cblas_daxpy(NSC, 1.0, &m.data[0][0], 1, &C_3_6.data[0][0], 1);
    for(shape_uint arenai=0; arenai<NSA; arenai++) tmp0.arena[arenai] = 0;
    for(shape_uint arenai=0; arenai<NSB; arenai++) tmp1.arena[arenai] = 0;
    static const int8_t A_coeffs_23[4] = {1, 1, 1, 1, };
    marr[0]=A_1_1;
    marr[1]=A_1_2;
    marr[2]=A_3_1;
    marr[3]=A_3_2;
    matlincomb_double_contiguous(tmp0, 4, (double_cmat*)marr, (int8_t*)A_coeffs_23);
    static const int8_t B_coeffs_23[3] = {-1, -1, -1, };
    marr[0]=Bxx23;
    marr[1]=Bxx30;
    marr[2]=Bxx32;
    matlincomb_double_contiguous(tmp1, 3, (double_cmat*)marr, (int8_t*)B_coeffs_23);
    cblas_dscal(NSB, dnum8, &tmp1.data[0][0], 1);
    matmul_double_blas(m, tmp0, tmp1);
    cblas_daxpy(NSC, -1/8.0, &m.data[0][0], 1, &C_1_1.data[0][0], 1);
    cblas_daxpy(NSC, 1/8.0, &m.data[0][0], 1, &C_2_1.data[0][0], 1);
    cblas_daxpy(NSC, -1.0, &m.data[0][0], 1, &C_1_2.data[0][0], 1);
    cblas_daxpy(NSC, -1.0, &m.data[0][0], 1, &C_3_2.data[0][0], 1);
    cblas_daxpy(NSC, 1.0, &m.data[0][0], 1, &C_1_3.data[0][0], 1);
    cblas_daxpy(NSC, 1.0, &m.data[0][0], 1, &C_3_3.data[0][0], 1);
    cblas_daxpy(NSC, -1.0, &m.data[0][0], 1, &C_1_4.data[0][0], 1);
    cblas_daxpy(NSC, -1/8.0, &m.data[0][0], 1, &C_1_5.data[0][0], 1);
    cblas_daxpy(NSC, -1/8.0, &m.data[0][0], 1, &C_2_5.data[0][0], 1);
    cblas_daxpy(NSC, -1.0, &m.data[0][0], 1, &C_1_6.data[0][0], 1);
    for(shape_uint arenai=0; arenai<NSA; arenai++) tmp0.arena[arenai] = 0;
    for(shape_uint arenai=0; arenai<NSB; arenai++) tmp1.arena[arenai] = 0;
    static const int8_t A_coeffs_36[4] = {-1, -1, 1, 1, };
    marr[0]=A_1_2;
    marr[1]=A_1_3;
    marr[2]=A_2_2;
    marr[3]=A_2_3;
    matlincomb_double_contiguous(tmp0, 4, (double_cmat*)marr, (int8_t*)A_coeffs_36);
    static const int8_t B_coeffs_36[3] = {1, 1, 1, };
    marr[0]=Bxx19;
    marr[1]=Bxx23;
    marr[2]=Bxx3;
    matlincomb_double_contiguous(tmp1, 3, (double_cmat*)marr, (int8_t*)B_coeffs_36);
    cblas_dscal(NSB, dnum8, &tmp1.data[0][0], 1);
    matmul_double_blas(m, tmp0, tmp1);
    cblas_daxpy(NSC, 1/8.0, &m.data[0][0], 1, &C_1_1.data[0][0], 1);
    cblas_daxpy(NSC, -1/8.0, &m.data[0][0], 1, &C_2_1.data[0][0], 1);
    cblas_daxpy(NSC, -1.0, &m.data[0][0], 1, &C_1_2.data[0][0], 1);
    cblas_daxpy(NSC, 1.0, &m.data[0][0], 1, &C_3_2.data[0][0], 1);
    cblas_daxpy(NSC, -1.0, &m.data[0][0], 1, &C_1_3.data[0][0], 1);
    cblas_daxpy(NSC, -1.0, &m.data[0][0], 1, &C_3_3.data[0][0], 1);
    cblas_daxpy(NSC, 1.0, &m.data[0][0], 1, &C_1_4.data[0][0], 1);
    cblas_daxpy(NSC, -1/8.0, &m.data[0][0], 1, &C_1_5.data[0][0], 1);
    cblas_daxpy(NSC, 1/8.0, &m.data[0][0], 1, &C_2_5.data[0][0], 1);
    cblas_daxpy(NSC, -1.0, &m.data[0][0], 1, &C_1_6.data[0][0], 1);
    for(shape_uint arenai=0; arenai<NSA; arenai++) tmp0.arena[arenai] = 0;
    for(shape_uint arenai=0; arenai<NSB; arenai++) tmp1.arena[arenai] = 0;
    for(shape_uint arenai=0; arenai<NSB; arenai++) Bxx29.arena[arenai] = 0;
    static const int8_t B_coeffs_Bxxeval57[2] = {8, 1, };
    marr[0]=B_1_1;
    marr[1]=Bxx20;
    matlincomb_double_contiguous(Bxx29, 2, (double_cmat*)marr,  (int8_t*)B_coeffs_Bxxeval57);
    static const int8_t A_coeffs_8[6] = {-1, 1, 1, 1, -1, -1, };
    marr[0]=A_1_1;
    marr[1]=A_1_3;
    marr[2]=A_2_2;
    marr[3]=A_2_3;
    marr[4]=A_3_1;
    marr[5]=A_3_2;
    matlincomb_double_contiguous(tmp0, 6, (double_cmat*)marr, (int8_t*)A_coeffs_8);
    static const int8_t B_coeffs_8[3] = {1, 1, 1, };
    marr[0]=Bxx27;
    marr[1]=Bxx29;
    marr[2]=Bxx7;
    matlincomb_double_contiguous(tmp1, 3, (double_cmat*)marr, (int8_t*)B_coeffs_8);
    cblas_dscal(NSB, dnum8, &tmp1.data[0][0], 1);
    matmul_double_blas(m, tmp0, tmp1);
    cblas_daxpy(NSC, -1/8.0, &m.data[0][0], 1, &C_3_1.data[0][0], 1);
    cblas_daxpy(NSC, 1.0, &m.data[0][0], 1, &C_2_2.data[0][0], 1);
    cblas_daxpy(NSC, -1.0, &m.data[0][0], 1, &C_1_3.data[0][0], 1);
    cblas_daxpy(NSC, -1.0, &m.data[0][0], 1, &C_3_3.data[0][0], 1);
    cblas_daxpy(NSC, 1.0, &m.data[0][0], 1, &C_2_4.data[0][0], 1);
    cblas_daxpy(NSC, -1.0, &m.data[0][0], 1, &C_3_4.data[0][0], 1);
    cblas_daxpy(NSC, 1/8.0, &m.data[0][0], 1, &C_1_5.data[0][0], 1);
    cblas_daxpy(NSC, 1/8.0, &m.data[0][0], 1, &C_2_5.data[0][0], 1);
    cblas_daxpy(NSC, 1.0, &m.data[0][0], 1, &C_1_6.data[0][0], 1);
    for(shape_uint arenai=0; arenai<NSA; arenai++) tmp0.arena[arenai] = 0;
    for(shape_uint arenai=0; arenai<NSB; arenai++) tmp1.arena[arenai] = 0;
    for(shape_uint arenai=0; arenai<NSB; arenai++) Bxx31.arena[arenai] = 0;
    static const int8_t B_coeffs_Bxxeval58[2] = {-1, 1, };
    marr[0]=B_2_6;
    marr[1]=Bxx29;
    matlincomb_double_contiguous(Bxx31, 2, (double_cmat*)marr,  (int8_t*)B_coeffs_Bxxeval58);
    static const int8_t A_coeffs_22[4] = {1, -1, 1, -1, };
    marr[0]=A_1_1;
    marr[1]=A_1_2;
    marr[2]=A_3_1;
    marr[3]=A_3_2;
    matlincomb_double_contiguous(tmp0, 4, (double_cmat*)marr, (int8_t*)A_coeffs_22);
    static const int8_t B_coeffs_22[3] = {-1, -1, -1, };
    marr[0]=Bxx17;
    marr[1]=Bxx31;
    marr[2]=Bxx36;
    matlincomb_double_contiguous(tmp1, 3, (double_cmat*)marr, (int8_t*)B_coeffs_22);
    cblas_dscal(NSB, dnum8, &tmp1.data[0][0], 1);
    matmul_double_blas(m, tmp0, tmp1);
    cblas_daxpy(NSC, -1/8.0, &m.data[0][0], 1, &C_1_1.data[0][0], 1);
    cblas_daxpy(NSC, -1/8.0, &m.data[0][0], 1, &C_2_1.data[0][0], 1);
    cblas_daxpy(NSC, 1.0, &m.data[0][0], 1, &C_1_2.data[0][0], 1);
    cblas_daxpy(NSC, 1.0, &m.data[0][0], 1, &C_3_2.data[0][0], 1);
    cblas_daxpy(NSC, -1.0, &m.data[0][0], 1, &C_1_3.data[0][0], 1);
    cblas_daxpy(NSC, -1.0, &m.data[0][0], 1, &C_3_3.data[0][0], 1);
    cblas_daxpy(NSC, -1.0, &m.data[0][0], 1, &C_1_4.data[0][0], 1);
    cblas_daxpy(NSC, -1/8.0, &m.data[0][0], 1, &C_1_5.data[0][0], 1);
    cblas_daxpy(NSC, 1/8.0, &m.data[0][0], 1, &C_2_5.data[0][0], 1);
    cblas_daxpy(NSC, -1.0, &m.data[0][0], 1, &C_1_6.data[0][0], 1);
    for(shape_uint arenai=0; arenai<NSA; arenai++) tmp0.arena[arenai] = 0;
    for(shape_uint arenai=0; arenai<NSB; arenai++) tmp1.arena[arenai] = 0;
    static const int8_t A_coeffs_33[4] = {1, 1, 1, 1, };
    marr[0]=A_1_2;
    marr[1]=A_1_3;
    marr[2]=A_2_2;
    marr[3]=A_2_3;
    matlincomb_double_contiguous(tmp0, 4, (double_cmat*)marr, (int8_t*)A_coeffs_33);
    static const int8_t B_coeffs_33[3] = {1, 1, 1, };
    marr[0]=Bxx15;
    marr[1]=Bxx31;
    marr[2]=Bxx37;
    matlincomb_double_contiguous(tmp1, 3, (double_cmat*)marr, (int8_t*)B_coeffs_33);
    cblas_dscal(NSB, dnum8, &tmp1.data[0][0], 1);
    matmul_double_blas(m, tmp0, tmp1);
    cblas_daxpy(NSC, 1/8.0, &m.data[0][0], 1, &C_1_1.data[0][0], 1);
    cblas_daxpy(NSC, 1/8.0, &m.data[0][0], 1, &C_2_1.data[0][0], 1);
    cblas_daxpy(NSC, 1.0, &m.data[0][0], 1, &C_1_2.data[0][0], 1);
    cblas_daxpy(NSC, -1.0, &m.data[0][0], 1, &C_3_2.data[0][0], 1);
    cblas_daxpy(NSC, 1.0, &m.data[0][0], 1, &C_1_3.data[0][0], 1);
    cblas_daxpy(NSC, 1.0, &m.data[0][0], 1, &C_3_3.data[0][0], 1);
    cblas_daxpy(NSC, 1.0, &m.data[0][0], 1, &C_1_4.data[0][0], 1);
    cblas_daxpy(NSC, -1/8.0, &m.data[0][0], 1, &C_1_5.data[0][0], 1);
    cblas_daxpy(NSC, -1/8.0, &m.data[0][0], 1, &C_2_5.data[0][0], 1);
    cblas_daxpy(NSC, -1.0, &m.data[0][0], 1, &C_1_6.data[0][0], 1);
    for(shape_uint arenai=0; arenai<NSA; arenai++) tmp0.arena[arenai] = 0;
    for(shape_uint arenai=0; arenai<NSB; arenai++) tmp1.arena[arenai] = 0;
    for(shape_uint arenai=0; arenai<NSB; arenai++) Bxx16.arena[arenai] = 0;
    static const int8_t B_coeffs_Bxxeval59[2] = {1, 1, };
    marr[0]=Bxx1;
    marr[1]=Bxx13;
    matlincomb_double_contiguous(Bxx16, 2, (double_cmat*)marr,  (int8_t*)B_coeffs_Bxxeval59);
    static const int8_t A_coeffs_6[6] = {-1, -1, 1, 1, -1, 1, };
    marr[0]=A_1_1;
    marr[1]=A_1_3;
    marr[2]=A_2_2;
    marr[3]=A_2_3;
    marr[4]=A_3_1;
    marr[5]=A_3_2;
    matlincomb_double_contiguous(tmp0, 6, (double_cmat*)marr, (int8_t*)A_coeffs_6);
    static const int8_t B_coeffs_6[3] = {-8, 1, 1, };
    marr[0]=B_1_1;
    marr[1]=Bxx16;
    marr[2]=Bxx27;
    matlincomb_double_contiguous(tmp1, 3, (double_cmat*)marr, (int8_t*)B_coeffs_6);
    cblas_dscal(NSB, dnum8, &tmp1.data[0][0], 1);
    matmul_double_blas(m, tmp0, tmp1);
    cblas_daxpy(NSC, 1/8.0, &m.data[0][0], 1, &C_3_1.data[0][0], 1);
    cblas_daxpy(NSC, -1.0, &m.data[0][0], 1, &C_2_2.data[0][0], 1);
    cblas_daxpy(NSC, -1.0, &m.data[0][0], 1, &C_1_3.data[0][0], 1);
    cblas_daxpy(NSC, -1.0, &m.data[0][0], 1, &C_3_3.data[0][0], 1);
    cblas_daxpy(NSC, 1.0, &m.data[0][0], 1, &C_2_4.data[0][0], 1);
    cblas_daxpy(NSC, 1.0, &m.data[0][0], 1, &C_3_4.data[0][0], 1);
    cblas_daxpy(NSC, -1/8.0, &m.data[0][0], 1, &C_1_5.data[0][0], 1);
    cblas_daxpy(NSC, 1/8.0, &m.data[0][0], 1, &C_2_5.data[0][0], 1);
    cblas_daxpy(NSC, -1.0, &m.data[0][0], 1, &C_1_6.data[0][0], 1);
    for(shape_uint arenai=0; arenai<NSA; arenai++) tmp0.arena[arenai] = 0;
    for(shape_uint arenai=0; arenai<NSB; arenai++) tmp1.arena[arenai] = 0;
    for(shape_uint arenai=0; arenai<NSB; arenai++) Bxx18.arena[arenai] = 0;
    static const int8_t B_coeffs_Bxxeval60[2] = {1, 1, };
    marr[0]=B_1_4;
    marr[1]=Bxx16;
    matlincomb_double_contiguous(Bxx18, 2, (double_cmat*)marr,  (int8_t*)B_coeffs_Bxxeval60);
    static const int8_t A_coeffs_18[4] = {-1, -1, -1, -1, };
    marr[0]=A_1_1;
    marr[1]=A_1_3;
    marr[2]=A_3_1;
    marr[3]=A_3_3;
    matlincomb_double_contiguous(tmp0, 4, (double_cmat*)marr, (int8_t*)A_coeffs_18);
    static const int8_t B_coeffs_18[3] = {1, 1, 1, };
    marr[0]=Bxx12;
    marr[1]=Bxx18;
    marr[2]=Bxx28;
    matlincomb_double_contiguous(tmp1, 3, (double_cmat*)marr, (int8_t*)B_coeffs_18);
    cblas_dscal(NSB, dnum8, &tmp1.data[0][0], 1);
    matmul_double_blas(m, tmp0, tmp1);
    cblas_daxpy(NSC, -1/8.0, &m.data[0][0], 1, &C_3_1.data[0][0], 1);
    cblas_daxpy(NSC, 1.0, &m.data[0][0], 1, &C_1_2.data[0][0], 1);
    cblas_daxpy(NSC, 1.0, &m.data[0][0], 1, &C_3_2.data[0][0], 1);
    cblas_daxpy(NSC, 1.0, &m.data[0][0], 1, &C_1_3.data[0][0], 1);
    cblas_daxpy(NSC, 1.0, &m.data[0][0], 1, &C_3_3.data[0][0], 1);
    cblas_daxpy(NSC, -1.0, &m.data[0][0], 1, &C_2_4.data[0][0], 1);
    cblas_daxpy(NSC, -1.0, &m.data[0][0], 1, &C_3_4.data[0][0], 1);
    cblas_daxpy(NSC, -1/8.0, &m.data[0][0], 1, &C_3_5.data[0][0], 1);
    cblas_daxpy(NSC, 1.0, &m.data[0][0], 1, &C_2_6.data[0][0], 1);
    cblas_daxpy(NSC, -1.0, &m.data[0][0], 1, &C_3_6.data[0][0], 1);
    for(shape_uint arenai=0; arenai<NSA; arenai++) tmp0.arena[arenai] = 0;
    for(shape_uint arenai=0; arenai<NSB; arenai++) tmp1.arena[arenai] = 0;
    static const int8_t A_coeffs_30[4] = {-1, -1, -1, -1, };
    marr[0]=A_2_2;
    marr[1]=A_2_3;
    marr[2]=A_3_2;
    marr[3]=A_3_3;
    matlincomb_double_contiguous(tmp0, 4, (double_cmat*)marr, (int8_t*)A_coeffs_30);
    static const int8_t B_coeffs_30[3] = {1, 1, 1, };
    marr[0]=Bxx18;
    marr[1]=Bxx34;
    marr[2]=Bxx5;
    matlincomb_double_contiguous(tmp1, 3, (double_cmat*)marr, (int8_t*)B_coeffs_30);
    cblas_dscal(NSB, dnum8, &tmp1.data[0][0], 1);
    matmul_double_blas(m, tmp0, tmp1);
    cblas_daxpy(NSC, 1/8.0, &m.data[0][0], 1, &C_3_1.data[0][0], 1);
    cblas_daxpy(NSC, -1.0, &m.data[0][0], 1, &C_1_2.data[0][0], 1);
    cblas_daxpy(NSC, 1.0, &m.data[0][0], 1, &C_3_2.data[0][0], 1);
    cblas_daxpy(NSC, -1.0, &m.data[0][0], 1, &C_1_3.data[0][0], 1);
    cblas_daxpy(NSC, -1.0, &m.data[0][0], 1, &C_3_3.data[0][0], 1);
    cblas_daxpy(NSC, 1.0, &m.data[0][0], 1, &C_2_4.data[0][0], 1);
    cblas_daxpy(NSC, 1.0, &m.data[0][0], 1, &C_3_4.data[0][0], 1);
    cblas_daxpy(NSC, -1/8.0, &m.data[0][0], 1, &C_3_5.data[0][0], 1);
    cblas_daxpy(NSC, -1.0, &m.data[0][0], 1, &C_2_6.data[0][0], 1);
    cblas_daxpy(NSC, -1.0, &m.data[0][0], 1, &C_3_6.data[0][0], 1);
    for(shape_uint arenai=0; arenai<NSA; arenai++) tmp0.arena[arenai] = 0;
    for(shape_uint arenai=0; arenai<NSB; arenai++) tmp1.arena[arenai] = 0;
    for(shape_uint arenai=0; arenai<NSB; arenai++) Bxx14.arena[arenai] = 0;
    static const int8_t B_coeffs_Bxxeval61[2] = {-1, 1, };
    marr[0]=B_2_2;
    marr[1]=B_3_2;
    matlincomb_double_contiguous(Bxx14, 2, (double_cmat*)marr,  (int8_t*)B_coeffs_Bxxeval61);
    for(shape_uint arenai=0; arenai<NSB; arenai++) Bxx16.arena[arenai] = 0;
    static const int8_t B_coeffs_Bxxeval62[2] = {1, 1, };
    marr[0]=B_1_4;
    marr[1]=Bxx14;
    matlincomb_double_contiguous(Bxx16, 2, (double_cmat*)marr,  (int8_t*)B_coeffs_Bxxeval62);
    static const int8_t A_coeffs_20[4] = {1, -1, -1, 1, };
    marr[0]=A_1_1;
    marr[1]=A_1_3;
    marr[2]=A_3_1;
    marr[3]=A_3_3;
    matlincomb_double_contiguous(tmp0, 4, (double_cmat*)marr, (int8_t*)A_coeffs_20);
    static const int8_t B_coeffs_20[3] = {1, 1, 1, };
    marr[0]=Bxx16;
    marr[1]=Bxx33;
    marr[2]=Bxx5;
    matlincomb_double_contiguous(tmp1, 3, (double_cmat*)marr, (int8_t*)B_coeffs_20);
    cblas_dscal(NSB, dnum8, &tmp1.data[0][0], 1);
    matmul_double_blas(m, tmp0, tmp1);
    cblas_daxpy(NSC, 1/8.0, &m.data[0][0], 1, &C_3_1.data[0][0], 1);
    cblas_daxpy(NSC, -1.0, &m.data[0][0], 1, &C_1_2.data[0][0], 1);
    cblas_daxpy(NSC, 1.0, &m.data[0][0], 1, &C_3_2.data[0][0], 1);
    cblas_daxpy(NSC, -1.0, &m.data[0][0], 1, &C_1_3.data[0][0], 1);
    cblas_daxpy(NSC, 1.0, &m.data[0][0], 1, &C_3_3.data[0][0], 1);
    cblas_daxpy(NSC, 1.0, &m.data[0][0], 1, &C_2_4.data[0][0], 1);
    cblas_daxpy(NSC, -1.0, &m.data[0][0], 1, &C_3_4.data[0][0], 1);
    cblas_daxpy(NSC, 1/8.0, &m.data[0][0], 1, &C_3_5.data[0][0], 1);
    cblas_daxpy(NSC, -1.0, &m.data[0][0], 1, &C_2_6.data[0][0], 1);
    cblas_daxpy(NSC, -1.0, &m.data[0][0], 1, &C_3_6.data[0][0], 1);
    for(shape_uint arenai=0; arenai<NSA; arenai++) tmp0.arena[arenai] = 0;
    for(shape_uint arenai=0; arenai<NSB; arenai++) tmp1.arena[arenai] = 0;
    static const int8_t A_coeffs_32[4] = {1, -1, -1, 1, };
    marr[0]=A_2_2;
    marr[1]=A_2_3;
    marr[2]=A_3_2;
    marr[3]=A_3_3;
    matlincomb_double_contiguous(tmp0, 4, (double_cmat*)marr, (int8_t*)A_coeffs_32);
    static const int8_t B_coeffs_32[6] = {1, -8, -1, 1, 1, 1, };
    marr[0]=B_1_6;
    marr[1]=B_3_1;
    marr[2]=B_3_6;
    marr[3]=Bxx11;
    marr[4]=Bxx16;
    marr[5]=Bxx28;
    matlincomb_double_contiguous(tmp1, 6, (double_cmat*)marr, (int8_t*)B_coeffs_32);
    cblas_dscal(NSB, dnum8, &tmp1.data[0][0], 1);
    matmul_double_blas(m, tmp0, tmp1);
    cblas_daxpy(NSC, -1/8.0, &m.data[0][0], 1, &C_3_1.data[0][0], 1);
    cblas_daxpy(NSC, 1.0, &m.data[0][0], 1, &C_1_2.data[0][0], 1);
    cblas_daxpy(NSC, 1.0, &m.data[0][0], 1, &C_3_2.data[0][0], 1);
    cblas_daxpy(NSC, 1.0, &m.data[0][0], 1, &C_1_3.data[0][0], 1);
    cblas_daxpy(NSC, -1.0, &m.data[0][0], 1, &C_3_3.data[0][0], 1);
    cblas_daxpy(NSC, -1.0, &m.data[0][0], 1, &C_2_4.data[0][0], 1);
    cblas_daxpy(NSC, 1.0, &m.data[0][0], 1, &C_3_4.data[0][0], 1);
    cblas_daxpy(NSC, 1/8.0, &m.data[0][0], 1, &C_3_5.data[0][0], 1);
    cblas_daxpy(NSC, 1.0, &m.data[0][0], 1, &C_2_6.data[0][0], 1);
    cblas_daxpy(NSC, -1.0, &m.data[0][0], 1, &C_3_6.data[0][0], 1);
    for(shape_uint arenai=0; arenai<NSA; arenai++) tmp0.arena[arenai] = 0;
    for(shape_uint arenai=0; arenai<NSB; arenai++) tmp1.arena[arenai] = 0;
    for(shape_uint arenai=0; arenai<NSB; arenai++) Bxx18.arena[arenai] = 0;
    static const int8_t B_coeffs_Bxxeval63[2] = {1, 1, };
    marr[0]=Bxx13;
    marr[1]=Bxx16;
    matlincomb_double_contiguous(Bxx18, 2, (double_cmat*)marr,  (int8_t*)B_coeffs_Bxxeval63);
    static const int8_t A_coeffs_17[4] = {1, 1, -1, -1, };
    marr[0]=A_1_1;
    marr[1]=A_1_3;
    marr[2]=A_3_1;
    marr[3]=A_3_3;
    matlincomb_double_contiguous(tmp0, 4, (double_cmat*)marr, (int8_t*)A_coeffs_17);
    static const int8_t B_coeffs_17[3] = {1, 1, 1, };
    marr[0]=Bxx18;
    marr[1]=Bxx34;
    marr[2]=Bxx4;
    matlincomb_double_contiguous(tmp1, 3, (double_cmat*)marr, (int8_t*)B_coeffs_17);
    cblas_dscal(NSB, dnum8, &tmp1.data[0][0], 1);
    matmul_double_blas(m, tmp0, tmp1);
    cblas_daxpy(NSC, 1/8.0, &m.data[0][0], 1, &C_3_1.data[0][0], 1);
    cblas_daxpy(NSC, 1.0, &m.data[0][0], 1, &C_1_2.data[0][0], 1);
    cblas_daxpy(NSC, -1.0, &m.data[0][0], 1, &C_3_2.data[0][0], 1);
    cblas_daxpy(NSC, 1.0, &m.data[0][0], 1, &C_1_3.data[0][0], 1);
    cblas_daxpy(NSC, -1.0, &m.data[0][0], 1, &C_3_3.data[0][0], 1);
    cblas_daxpy(NSC, -1.0, &m.data[0][0], 1, &C_2_4.data[0][0], 1);
    cblas_daxpy(NSC, -1.0, &m.data[0][0], 1, &C_3_4.data[0][0], 1);
    cblas_daxpy(NSC, 1/8.0, &m.data[0][0], 1, &C_3_5.data[0][0], 1);
    cblas_daxpy(NSC, 1.0, &m.data[0][0], 1, &C_2_6.data[0][0], 1);
    cblas_daxpy(NSC, -1.0, &m.data[0][0], 1, &C_3_6.data[0][0], 1);
    for(shape_uint arenai=0; arenai<NSA; arenai++) tmp0.arena[arenai] = 0;
    for(shape_uint arenai=0; arenai<NSB; arenai++) tmp1.arena[arenai] = 0;
    static const int8_t A_coeffs_29[4] = {-1, 1, -1, 1, };
    marr[0]=A_2_2;
    marr[1]=A_2_3;
    marr[2]=A_3_2;
    marr[3]=A_3_3;
    matlincomb_double_contiguous(tmp0, 4, (double_cmat*)marr, (int8_t*)A_coeffs_29);
    static const int8_t B_coeffs_29[5] = {8, -1, -8, 1, 1, };
    marr[0]=B_3_1;
    marr[1]=B_3_4;
    marr[2]=B_3_5;
    marr[3]=Bxx18;
    marr[4]=Bxx28;
    matlincomb_double_contiguous(tmp1, 5, (double_cmat*)marr, (int8_t*)B_coeffs_29);
    cblas_dscal(NSB, dnum8, &tmp1.data[0][0], 1);
    matmul_double_blas(m, tmp0, tmp1);
    cblas_daxpy(NSC, 1/8.0, &m.data[0][0], 1, &C_3_1.data[0][0], 1);
    cblas_daxpy(NSC, 1.0, &m.data[0][0], 1, &C_1_2.data[0][0], 1);
    cblas_daxpy(NSC, 1.0, &m.data[0][0], 1, &C_3_2.data[0][0], 1);
    cblas_daxpy(NSC, 1.0, &m.data[0][0], 1, &C_1_3.data[0][0], 1);
    cblas_daxpy(NSC, -1.0, &m.data[0][0], 1, &C_3_3.data[0][0], 1);
    cblas_daxpy(NSC, -1.0, &m.data[0][0], 1, &C_2_4.data[0][0], 1);
    cblas_daxpy(NSC, -1.0, &m.data[0][0], 1, &C_3_4.data[0][0], 1);
    cblas_daxpy(NSC, -1/8.0, &m.data[0][0], 1, &C_3_5.data[0][0], 1);
    cblas_daxpy(NSC, 1.0, &m.data[0][0], 1, &C_2_6.data[0][0], 1);
    cblas_daxpy(NSC, 1.0, &m.data[0][0], 1, &C_3_6.data[0][0], 1);
    for(shape_uint arenai=0; arenai<NSA; arenai++) tmp0.arena[arenai] = 0;
    for(shape_uint arenai=0; arenai<NSB; arenai++) tmp1.arena[arenai] = 0;
    for(shape_uint arenai=0; arenai<NSB; arenai++) Bxx11.arena[arenai] = 0;
    static const int8_t B_coeffs_Bxxeval64[2] = {1, 1, };
    marr[0]=B_2_6;
    marr[1]=Bxx14;
    matlincomb_double_contiguous(Bxx11, 2, (double_cmat*)marr,  (int8_t*)B_coeffs_Bxxeval64);
    static const int8_t A_coeffs_24[4] = {-1, 1, 1, -1, };
    marr[0]=A_1_1;
    marr[1]=A_1_2;
    marr[2]=A_3_1;
    marr[3]=A_3_2;
    matlincomb_double_contiguous(tmp0, 4, (double_cmat*)marr, (int8_t*)A_coeffs_24);
    static const int8_t B_coeffs_24[3] = {1, 1, 1, };
    marr[0]=Bxx11;
    marr[1]=Bxx19;
    marr[2]=Bxx37;
    matlincomb_double_contiguous(tmp1, 3, (double_cmat*)marr, (int8_t*)B_coeffs_24);
    cblas_dscal(NSB, dnum8, &tmp1.data[0][0], 1);
    matmul_double_blas(m, tmp0, tmp1);
    cblas_daxpy(NSC, -1/8.0, &m.data[0][0], 1, &C_1_1.data[0][0], 1);
    cblas_daxpy(NSC, -1/8.0, &m.data[0][0], 1, &C_2_1.data[0][0], 1);
    cblas_daxpy(NSC, -1.0, &m.data[0][0], 1, &C_1_2.data[0][0], 1);
    cblas_daxpy(NSC, 1.0, &m.data[0][0], 1, &C_3_2.data[0][0], 1);
    cblas_daxpy(NSC, 1.0, &m.data[0][0], 1, &C_1_3.data[0][0], 1);
    cblas_daxpy(NSC, -1.0, &m.data[0][0], 1, &C_3_3.data[0][0], 1);
    cblas_daxpy(NSC, 1.0, &m.data[0][0], 1, &C_1_4.data[0][0], 1);
    cblas_daxpy(NSC, -1/8.0, &m.data[0][0], 1, &C_1_5.data[0][0], 1);
    cblas_daxpy(NSC, 1/8.0, &m.data[0][0], 1, &C_2_5.data[0][0], 1);
    cblas_daxpy(NSC, 1.0, &m.data[0][0], 1, &C_1_6.data[0][0], 1);
    for(shape_uint arenai=0; arenai<NSA; arenai++) tmp0.arena[arenai] = 0;
    for(shape_uint arenai=0; arenai<NSB; arenai++) tmp1.arena[arenai] = 0;
    static const int8_t A_coeffs_35[4] = {1, -1, 1, -1, };
    marr[0]=A_1_2;
    marr[1]=A_1_3;
    marr[2]=A_2_2;
    marr[3]=A_2_3;
    matlincomb_double_contiguous(tmp0, 4, (double_cmat*)marr, (int8_t*)A_coeffs_35);
    static const int8_t B_coeffs_35[3] = {-1, -1, -1, };
    marr[0]=Bxx11;
    marr[1]=Bxx17;
    marr[2]=Bxx30;
    matlincomb_double_contiguous(tmp1, 3, (double_cmat*)marr, (int8_t*)B_coeffs_35);
    cblas_dscal(NSB, dnum8, &tmp1.data[0][0], 1);
    matmul_double_blas(m, tmp0, tmp1);
    cblas_daxpy(NSC, -1/8.0, &m.data[0][0], 1, &C_1_1.data[0][0], 1);
    cblas_daxpy(NSC, -1/8.0, &m.data[0][0], 1, &C_2_1.data[0][0], 1);
    cblas_daxpy(NSC, 1.0, &m.data[0][0], 1, &C_1_2.data[0][0], 1);
    cblas_daxpy(NSC, 1.0, &m.data[0][0], 1, &C_3_2.data[0][0], 1);
    cblas_daxpy(NSC, 1.0, &m.data[0][0], 1, &C_1_3.data[0][0], 1);
    cblas_daxpy(NSC, -1.0, &m.data[0][0], 1, &C_3_3.data[0][0], 1);
    cblas_daxpy(NSC, 1.0, &m.data[0][0], 1, &C_1_4.data[0][0], 1);
    cblas_daxpy(NSC, 1/8.0, &m.data[0][0], 1, &C_1_5.data[0][0], 1);
    cblas_daxpy(NSC, 1/8.0, &m.data[0][0], 1, &C_2_5.data[0][0], 1);
    cblas_daxpy(NSC, -1.0, &m.data[0][0], 1, &C_1_6.data[0][0], 1);
    for(shape_uint arenai=0; arenai<NSA; arenai++) tmp0.arena[arenai] = 0;
    for(shape_uint arenai=0; arenai<NSB; arenai++) tmp1.arena[arenai] = 0;
    for(shape_uint arenai=0; arenai<NSB; arenai++) Bxx1.arena[arenai] = 0;
    static const int8_t B_coeffs_Bxxeval65[2] = {1, 1, };
    marr[0]=Bxx14;
    marr[1]=Bxx9;
    matlincomb_double_contiguous(Bxx1, 2, (double_cmat*)marr,  (int8_t*)B_coeffs_Bxxeval65);
    static const int8_t A_coeffs_21[4] = {1, 1, -1, -1, };
    marr[0]=A_1_1;
    marr[1]=A_1_2;
    marr[2]=A_3_1;
    marr[3]=A_3_2;
    matlincomb_double_contiguous(tmp0, 4, (double_cmat*)marr, (int8_t*)A_coeffs_21);
    static const int8_t B_coeffs_21[3] = {-1, -1, -1, };
    marr[0]=Bxx1;
    marr[1]=Bxx15;
    marr[2]=Bxx3;
    matlincomb_double_contiguous(tmp1, 3, (double_cmat*)marr, (int8_t*)B_coeffs_21);
    cblas_dscal(NSB, dnum8, &tmp1.data[0][0], 1);
    matmul_double_blas(m, tmp0, tmp1);
    cblas_daxpy(NSC, -1/8.0, &m.data[0][0], 1, &C_1_1.data[0][0], 1);
    cblas_daxpy(NSC, 1/8.0, &m.data[0][0], 1, &C_2_1.data[0][0], 1);
    cblas_daxpy(NSC, 1.0, &m.data[0][0], 1, &C_1_2.data[0][0], 1);
    cblas_daxpy(NSC, -1.0, &m.data[0][0], 1, &C_3_2.data[0][0], 1);
    cblas_daxpy(NSC, -1.0, &m.data[0][0], 1, &C_1_3.data[0][0], 1);
    cblas_daxpy(NSC, 1.0, &m.data[0][0], 1, &C_3_3.data[0][0], 1);
    cblas_daxpy(NSC, 1.0, &m.data[0][0], 1, &C_1_4.data[0][0], 1);
    cblas_daxpy(NSC, -1/8.0, &m.data[0][0], 1, &C_1_5.data[0][0], 1);
    cblas_daxpy(NSC, -1/8.0, &m.data[0][0], 1, &C_2_5.data[0][0], 1);
    cblas_daxpy(NSC, 1.0, &m.data[0][0], 1, &C_1_6.data[0][0], 1);
    for(shape_uint arenai=0; arenai<NSA; arenai++) tmp0.arena[arenai] = 0;
    for(shape_uint arenai=0; arenai<NSB; arenai++) tmp1.arena[arenai] = 0;
    static const int8_t A_coeffs_34[4] = {-1, 1, 1, -1, };
    marr[0]=A_1_2;
    marr[1]=A_1_3;
    marr[2]=A_2_2;
    marr[3]=A_2_3;
    matlincomb_double_contiguous(tmp0, 4, (double_cmat*)marr, (int8_t*)A_coeffs_34);
    static const int8_t B_coeffs_34[3] = {-1, -1, -1, };
    marr[0]=Bxx1;
    marr[1]=Bxx32;
    marr[2]=Bxx36;
    matlincomb_double_contiguous(tmp1, 3, (double_cmat*)marr, (int8_t*)B_coeffs_34);
    cblas_dscal(NSB, dnum8, &tmp1.data[0][0], 1);
    matmul_double_blas(m, tmp0, tmp1);
    cblas_daxpy(NSC, -1/8.0, &m.data[0][0], 1, &C_1_1.data[0][0], 1);
    cblas_daxpy(NSC, 1/8.0, &m.data[0][0], 1, &C_2_1.data[0][0], 1);
    cblas_daxpy(NSC, -1.0, &m.data[0][0], 1, &C_1_2.data[0][0], 1);
    cblas_daxpy(NSC, -1.0, &m.data[0][0], 1, &C_3_2.data[0][0], 1);
    cblas_daxpy(NSC, -1.0, &m.data[0][0], 1, &C_1_3.data[0][0], 1);
    cblas_daxpy(NSC, 1.0, &m.data[0][0], 1, &C_3_3.data[0][0], 1);
    cblas_daxpy(NSC, 1.0, &m.data[0][0], 1, &C_1_4.data[0][0], 1);
    cblas_daxpy(NSC, 1/8.0, &m.data[0][0], 1, &C_1_5.data[0][0], 1);
    cblas_daxpy(NSC, -1/8.0, &m.data[0][0], 1, &C_2_5.data[0][0], 1);
    cblas_daxpy(NSC, -1.0, &m.data[0][0], 1, &C_1_6.data[0][0], 1);
    for(shape_uint arenai=0; arenai<NSA; arenai++) tmp0.arena[arenai] = 0;
    for(shape_uint arenai=0; arenai<NSB; arenai++) tmp1.arena[arenai] = 0;
    for(shape_uint arenai=0; arenai<NSB; arenai++) Bxx23.arena[arenai] = 0;
    static const int8_t B_coeffs_Bxxeval66[2] = {1, 1, };
    marr[0]=B_1_3;
    marr[1]=Bxx14;
    matlincomb_double_contiguous(Bxx23, 2, (double_cmat*)marr,  (int8_t*)B_coeffs_Bxxeval66);
    static const int8_t A_coeffs_1[6] = {1, -1, 1, -1, -1, 1, };
    marr[0]=A_1_1;
    marr[1]=A_1_3;
    marr[2]=A_2_2;
    marr[3]=A_2_3;
    marr[4]=A_3_1;
    marr[5]=A_3_2;
    matlincomb_double_contiguous(tmp0, 6, (double_cmat*)marr, (int8_t*)A_coeffs_1);
    static const int8_t B_coeffs_1[4] = {1, -1, -1, -1, };
    marr[0]=B_3_4;
    marr[1]=Bxx23;
    marr[2]=Bxx24;
    marr[3]=Bxx8;
    matlincomb_double_contiguous(tmp1, 4, (double_cmat*)marr, (int8_t*)B_coeffs_1);
    cblas_dscal(NSB, dnum8, &tmp1.data[0][0], 1);
    matmul_double_blas(m, tmp0, tmp1);
    cblas_daxpy(NSC, 1/8.0, &m.data[0][0], 1, &C_1_1.data[0][0], 1);
    cblas_daxpy(NSC, 1/8.0, &m.data[0][0], 1, &C_2_1.data[0][0], 1);
    cblas_daxpy(NSC, 1.0, &m.data[0][0], 1, &C_2_2.data[0][0], 1);
    cblas_daxpy(NSC, -1.0, &m.data[0][0], 1, &C_1_3.data[0][0], 1);
    cblas_daxpy(NSC, 1.0, &m.data[0][0], 1, &C_3_3.data[0][0], 1);
    cblas_daxpy(NSC, -1.0, &m.data[0][0], 1, &C_1_4.data[0][0], 1);
    cblas_daxpy(NSC, 1/8.0, &m.data[0][0], 1, &C_3_5.data[0][0], 1);
    cblas_daxpy(NSC, -1.0, &m.data[0][0], 1, &C_2_6.data[0][0], 1);
    cblas_daxpy(NSC, -1.0, &m.data[0][0], 1, &C_3_6.data[0][0], 1);
    for(shape_uint arenai=0; arenai<NSA; arenai++) tmp0.arena[arenai] = 0;
    for(shape_uint arenai=0; arenai<NSB; arenai++) tmp1.arena[arenai] = 0;
    static const int8_t A_coeffs_7[6] = {-1, 1, 1, -1, 1, -1, };
    marr[0]=A_1_1;
    marr[1]=A_1_3;
    marr[2]=A_2_2;
    marr[3]=A_2_3;
    marr[4]=A_3_1;
    marr[5]=A_3_2;
    matlincomb_double_contiguous(tmp0, 6, (double_cmat*)marr, (int8_t*)A_coeffs_7);
    static const int8_t B_coeffs_7[3] = {-1, -1, -1, };
    marr[0]=Bxx22;
    marr[1]=Bxx23;
    marr[2]=Bxx26;
    matlincomb_double_contiguous(tmp1, 3, (double_cmat*)marr, (int8_t*)B_coeffs_7);
    cblas_dscal(NSB, dnum8, &tmp1.data[0][0], 1);
    matmul_double_blas(m, tmp0, tmp1);
    cblas_daxpy(NSC, -1/8.0, &m.data[0][0], 1, &C_3_1.data[0][0], 1);
    cblas_daxpy(NSC, 1.0, &m.data[0][0], 1, &C_2_2.data[0][0], 1);
    cblas_daxpy(NSC, 1.0, &m.data[0][0], 1, &C_1_3.data[0][0], 1);
    cblas_daxpy(NSC, -1.0, &m.data[0][0], 1, &C_3_3.data[0][0], 1);
    cblas_daxpy(NSC, -1.0, &m.data[0][0], 1, &C_2_4.data[0][0], 1);
    cblas_daxpy(NSC, 1.0, &m.data[0][0], 1, &C_3_4.data[0][0], 1);
    cblas_daxpy(NSC, -1/8.0, &m.data[0][0], 1, &C_1_5.data[0][0], 1);
    cblas_daxpy(NSC, 1/8.0, &m.data[0][0], 1, &C_2_5.data[0][0], 1);
    cblas_daxpy(NSC, 1.0, &m.data[0][0], 1, &C_1_6.data[0][0], 1);
    for(shape_uint arenai=0; arenai<NSA; arenai++) tmp0.arena[arenai] = 0;
    for(shape_uint arenai=0; arenai<NSB; arenai++) tmp1.arena[arenai] = 0;
    for(shape_uint arenai=0; arenai<NSB; arenai++) Bxx15.arena[arenai] = 0;
    static const int8_t B_coeffs_Bxxeval67[2] = {-1, 1, };
    marr[0]=B_1_3;
    marr[1]=Bxx14;
    matlincomb_double_contiguous(Bxx15, 2, (double_cmat*)marr,  (int8_t*)B_coeffs_Bxxeval67);
    static const int8_t A_coeffs_2[6] = {1, 1, 1, -1, -1, -1, };
    marr[0]=A_1_1;
    marr[1]=A_1_3;
    marr[2]=A_2_2;
    marr[3]=A_2_3;
    marr[4]=A_3_1;
    marr[5]=A_3_2;
    matlincomb_double_contiguous(tmp0, 6, (double_cmat*)marr, (int8_t*)A_coeffs_2);
    static const int8_t B_coeffs_2[4] = {-8, 1, 1, 1, };
    marr[0]=B_3_1;
    marr[1]=Bxx10;
    marr[2]=Bxx15;
    marr[3]=Bxx2;
    matlincomb_double_contiguous(tmp1, 4, (double_cmat*)marr, (int8_t*)B_coeffs_2);
    cblas_dscal(NSB, dnum8, &tmp1.data[0][0], 1);
    matmul_double_blas(m, tmp0, tmp1);
    cblas_daxpy(NSC, -1/8.0, &m.data[0][0], 1, &C_1_1.data[0][0], 1);
    cblas_daxpy(NSC, 1/8.0, &m.data[0][0], 1, &C_2_1.data[0][0], 1);
    cblas_daxpy(NSC, -1.0, &m.data[0][0], 1, &C_2_2.data[0][0], 1);
    cblas_daxpy(NSC, -1.0, &m.data[0][0], 1, &C_1_3.data[0][0], 1);
    cblas_daxpy(NSC, 1.0, &m.data[0][0], 1, &C_3_3.data[0][0], 1);
    cblas_daxpy(NSC, 1.0, &m.data[0][0], 1, &C_1_4.data[0][0], 1);
    cblas_daxpy(NSC, -1/8.0, &m.data[0][0], 1, &C_3_5.data[0][0], 1);
    cblas_daxpy(NSC, -1.0, &m.data[0][0], 1, &C_2_6.data[0][0], 1);
    cblas_daxpy(NSC, 1.0, &m.data[0][0], 1, &C_3_6.data[0][0], 1);
    for(shape_uint arenai=0; arenai<NSA; arenai++) tmp0.arena[arenai] = 0;
    for(shape_uint arenai=0; arenai<NSB; arenai++) tmp1.arena[arenai] = 0;
    static const int8_t A_coeffs_5[6] = {-1, -1, 1, -1, 1, 1, };
    marr[0]=A_1_1;
    marr[1]=A_1_3;
    marr[2]=A_2_2;
    marr[3]=A_2_3;
    marr[4]=A_3_1;
    marr[5]=A_3_2;
    matlincomb_double_contiguous(tmp0, 6, (double_cmat*)marr, (int8_t*)A_coeffs_5);
    static const int8_t B_coeffs_5[4] = {8, -1, -1, -1, };
    marr[0]=B_3_5;
    marr[1]=Bxx15;
    marr[2]=Bxx21;
    marr[3]=Bxx25;
    matlincomb_double_contiguous(tmp1, 4, (double_cmat*)marr, (int8_t*)B_coeffs_5);
    cblas_dscal(NSB, dnum8, &tmp1.data[0][0], 1);
    matmul_double_blas(m, tmp0, tmp1);
    cblas_daxpy(NSC, -1/8.0, &m.data[0][0], 1, &C_3_1.data[0][0], 1);
    cblas_daxpy(NSC, 1.0, &m.data[0][0], 1, &C_2_2.data[0][0], 1);
    cblas_daxpy(NSC, -1.0, &m.data[0][0], 1, &C_1_3.data[0][0], 1);
    cblas_daxpy(NSC, 1.0, &m.data[0][0], 1, &C_3_3.data[0][0], 1);
    cblas_daxpy(NSC, 1.0, &m.data[0][0], 1, &C_2_4.data[0][0], 1);
    cblas_daxpy(NSC, 1.0, &m.data[0][0], 1, &C_3_4.data[0][0], 1);
    cblas_daxpy(NSC, -1/8.0, &m.data[0][0], 1, &C_1_5.data[0][0], 1);
    cblas_daxpy(NSC, -1/8.0, &m.data[0][0], 1, &C_2_5.data[0][0], 1);
    cblas_daxpy(NSC, 1.0, &m.data[0][0], 1, &C_1_6.data[0][0], 1);
    for(shape_uint arenai=0; arenai<NSA; arenai++) tmp0.arena[arenai] = 0;
    for(shape_uint arenai=0; arenai<NSB; arenai++) tmp1.arena[arenai] = 0;
    assign_double_slice(C, C_x_1, pairint {0, C_height}, pairint { 0*BLHC, 1*BLWC });
    assign_double_slice(C, C_x_2, pairint {0, C_height}, pairint { 1*BLHC, 2*BLWC });
    assign_double_slice(C, C_x_3, pairint {0, C_height}, pairint { 2*BLHC, 3*BLWC });
    assign_double_slice(C, C_x_4, pairint {0, C_height}, pairint { 3*BLHC, 4*BLWC });
    assign_double_slice(C, C_x_5, pairint {0, C_height}, pairint { 4*BLHC, 5*BLWC });
    assign_double_slice(C, C_x_6, pairint {0, C_height}, pairint { 5*BLHC, 6*BLWC });
    free_double_matrix(A_1_1);
    free_double_matrix(A_1_2);
    free_double_matrix(A_1_3);
    free_double_matrix(A_2_1);
    free_double_matrix(A_2_2);
    free_double_matrix(A_2_3);
    free_double_matrix(A_3_1);
    free_double_matrix(A_3_2);
    free_double_matrix(A_3_3);
    free_double_matrix(B_1_1);
    free_double_matrix(C_1_1);
    free_double_matrix(B_1_2);
    free_double_matrix(C_1_2);
    free_double_matrix(B_1_3);
    free_double_matrix(C_1_3);
    free_double_matrix(B_1_4);
    free_double_matrix(C_1_4);
    free_double_matrix(B_1_5);
    free_double_matrix(C_1_5);
    free_double_matrix(B_1_6);
    free_double_matrix(C_1_6);
    free_double_matrix(B_2_1);
    free_double_matrix(C_2_1);
    free_double_matrix(B_2_2);
    free_double_matrix(C_2_2);
    free_double_matrix(B_2_3);
    free_double_matrix(C_2_3);
    free_double_matrix(B_2_4);
    free_double_matrix(C_2_4);
    free_double_matrix(B_2_5);
    free_double_matrix(C_2_5);
    free_double_matrix(B_2_6);
    free_double_matrix(C_2_6);
    free_double_matrix(B_3_1);
    free_double_matrix(C_3_1);
    free_double_matrix(B_3_2);
    free_double_matrix(C_3_2);
    free_double_matrix(B_3_3);
    free_double_matrix(C_3_3);
    free_double_matrix(B_3_4);
    free_double_matrix(C_3_4);
    free_double_matrix(B_3_5);
    free_double_matrix(C_3_5);
    free_double_matrix(B_3_6);
    free_double_matrix(C_3_6);
    free_double_matrix(A_x_1);
    free_double_matrix(A_x_2);
    free_double_matrix(A_x_3);
    free_double_matrix(B_x_1);
    free_double_matrix(C_x_1);
    free_double_matrix(B_x_2);
    free_double_matrix(C_x_2);
    free_double_matrix(B_x_3);
    free_double_matrix(C_x_3);
    free_double_matrix(B_x_4);
    free_double_matrix(C_x_4);
    free_double_matrix(B_x_5);
    free_double_matrix(C_x_5);
    free_double_matrix(B_x_6);
    free_double_matrix(C_x_6);
    free_double_matrix(Bxx1);
    free_double_matrix(Bxx10);
    free_double_matrix(Bxx11);
    free_double_matrix(Bxx12);
    free_double_matrix(Bxx13);
    free_double_matrix(Bxx14);
    free_double_matrix(Bxx15);
    free_double_matrix(Bxx16);
    free_double_matrix(Bxx17);
    free_double_matrix(Bxx18);
    free_double_matrix(Bxx19);
    free_double_matrix(Bxx2);
    free_double_matrix(Bxx20);
    free_double_matrix(Bxx21);
    free_double_matrix(Bxx22);
    free_double_matrix(Bxx23);
    free_double_matrix(Bxx24);
    free_double_matrix(Bxx25);
    free_double_matrix(Bxx26);
    free_double_matrix(Bxx27);
    free_double_matrix(Bxx28);
    free_double_matrix(Bxx29);
    free_double_matrix(Bxx3);
    free_double_matrix(Bxx30);
    free_double_matrix(Bxx31);
    free_double_matrix(Bxx32);
    free_double_matrix(Bxx33);
    free_double_matrix(Bxx34);
    free_double_matrix(Bxx35);
    free_double_matrix(Bxx36);
    free_double_matrix(Bxx37);
    free_double_matrix(Bxx4);
    free_double_matrix(Bxx5);
    free_double_matrix(Bxx6);
    free_double_matrix(Bxx7);
    free_double_matrix(Bxx8);
    free_double_matrix(Bxx9);
    free_double_matrix(m);
    free_double_matrix(tmp0);
    free_double_matrix(tmp1);
    return 0;
}
